CONSULT/REQUEST TRACKING |
IFC processing code needs EDIPI for a DFN so EDIPI can
be included in HL7 message to Cerner. Function is in GMRCIUTL:
EDIPI(DFN) ; p184
;
; Return patient's EDIPI
;
N INST,EDIPI,TYPE,IEN,X ;
;
S INST=0,EDIPI="" ;
F S INST=$O(^DGCN(391.91,"AKEY",DFN,INST)) Q:'INST!(EDIPI'="") S TYPE="" F
S TYPE=$O(^DGCN(391.91,"AKEY",DFN,INST,TYPE)) Q:TYPE="" I
$D(^DGCN(391.91,"AKEY",DFN,INST,TYPE,"USDOD")) D ;
. S IEN=0 F S IEN=$O(^DGCN(391.91,"AKEY",DFN,INST,TYPE,"USDOD",IEN)) Q:'IEN
S X=$G(^DGCN(391.91,IEN,2)) I X'="",$P(X,U,3)'="H" S
EDIPI=$S(EDIPI="":"",1:EDIPI_U)_$P(X,U,2) ;
;
Q EDIPI ;
;
|