Instructions for requesting a batch of data from DSM

From CCMDB Wiki
Revision as of 09:55, 2014 August 25 by Ttenbergen (talk | contribs) (→‎MRN Field: u)
Jump to navigation Jump to search

Requestinglab Field

Appears like these are used a bit inconsistently with the OrderingLocationName field...

Key

LAB_ID	DSM Lab
BEC	Beausejour
BEH	Steinbach
CGH	Concordia
DHC	Dauphin
FFH	Flin Flon
GGH	Grace
HSC	HSC
MHC	Miseri
MTCC	Mount Carmel
NES	Neepawa
PDH	Portage
RHC	Riverview
SBGH	St. Boniface
SGH	Selkirk
SOGH	Seven Oaks
TGH	Thompson
TPC	Pas
VGH	Victoria

MRN Field

  • sometimes starts with letters for hospitals, and a ton use PHIN instead for whatever reason...
  • this MS SQL code should isolate the prefix:
Switch(
 Left([mrn],1)="C","CGH",
 Left([mrn],1)="D","Deer Lodge",
 Left([mrn],1)="G","GGH",
 Left([mrn],1)="M","Misericordia",
 Left([mrn],1)="N","HSC",
 Left([mrn],1)="P","_PHIN_used",
 Left([mrn],1)="R","Riverview",
 Left([mrn],1)="S","SOGH",
 Left([mrn],1)="V","Vic",
 Left([mrn],1)="1","_no_prefix",
 Left([mrn],1)="0","_no_prefix",
 True,"!! unaccounted for")
  • this MS SQL code should isolate the MRN for linking
 Switch(
 Left([mrn],1)="C",mid([mrn],2),
 Left([mrn],1)="D",mid([mrn],2),
 Left([mrn],1)="G",mid([mrn],2),
 Left([mrn],1)="M",mid([mrn],2),
 Left([mrn],1)="N",mid([mrn],2),
 Left([mrn],1)="P",mid([mrn],4),
 Left([mrn],1)="R",mid([mrn],2),
 Left([mrn],1)="S",mid([mrn],2),
 Left([mrn],1)="V",mid([mrn],2),
 Left([mrn],1)="1",[mrn]
 Left([mrn],1)="0",[mrn]
 True,"!! unaccounted for")