progress on IMMUNIZATIONS

This commit is contained in:
george 2009-02-03 15:29:44 +00:00
parent 7a32f776c5
commit 1cb34c71b1
2 changed files with 25 additions and 5 deletions

View File

@ -344,11 +344,11 @@ ZVALUE(ZFN,ZTAB) ;EXTRINSIC TO RETURN VALUE FOR FIELD NAME PASSED
; BY VALUE IN ZFN. FILE NUMBER IS PIECE 3 OF @ZTAB@(ZFN)
; IF ZTAB IS NULL, IT DEFAULTS TO C0CA
I '$D(ZTAB) S ZTAB="C0CA"
Q $P(@ZTAB@(ZFN),"^",3)
Q $P($G(@ZTAB@(ZFN)),"^",3)
;
ZVALUEI(ZFN,ZTAB) ;EXTRINSIC TO RETURN INTERNAL VALUE FOR FIELD NAME PASSED
; BY VALUE IN ZFN. FILE NUMBER IS PIECE 3 OF @ZTAB@(ZFN)
; IF ZTAB IS NULL, IT DEFAULTS TO C0CA
I '$D(ZTAB) S ZTAB="C0CA"
Q $P(@ZTAB@(ZFN,"I"),"^",3)
Q $P($G(@ZTAB@(ZFN,"I")),"^",3)
;

View File

@ -39,15 +39,35 @@ EXTRACT(IPXML,DFN,OUTXML) ; EXTRACT IMMUNIZATIONS INTO VARIABLES
. W "NULL RESULT FROM IMMUN^PXRHS03 ",!
. S @OUTXML@(0)=0
;S @TVMAP@(0)=RPCRSLT(0) ; SAVE NUMBER OF PROBLEMS
N C0CIM,C0CC,C0CIMD,C0CIEN,C0CT ;
S C0CIM=""
S C0CC=0 ; COUNT
F S C0CIM=$O(@IMMA@(C0CIM)) Q:C0CIM="" D ; FOR EACH IMMUNE TYPE IN THE LIST
. S C0CC=C0CC+1 ;INCREMENT COUNT
. S @TVMAP@(0)=C0CC ; SAVE NEW COUNT TO ARRAY
. S VMAP=$NA(@TVMAP@(C0CC)) ; THIS IMMUNE ELEMENT
. K @VMAP ; MAKE SURE IT IS CLEARED OUT
. W C0CIM,!
. S C0CIMD="" ; IMMUNE DATE
. F S C0CIMD=$O(@IMMA@(C0CIM,C0CIMD)) Q:C0CIMD="" D ; FOR EACH DATE
. . S C0CIEN=$O(@IMMA@(C0CIM,C0CIMD,"")) ;IEN OF IMMUNE RECORD
. . D GETN^C0CRNF("C0CI",9000010.11,C0CIEN) ;
. . W C0CIEN,"_",C0CIMD,!
. B
. . D GETN^C0CRNF("C0CI",9000010.11,C0CIEN) ; GET THE FILEMAN RECORD TO PULL IENS
. . W C0CIEN,"_",C0CIMD
. . S C0CT=$$FMDTOUTC^CCRUTIL(9999999-C0CIMD,"DT") ; FORMAT DATE/TIME
. . W C0CT,!
. . S @VMAP@("IMMUNEOBJECTID")="IMMUNIZATION_"_C0CC ;UNIQUE OBJECT ID
. . S @VMAP@("IMMUNEDATETIMETYPETEXT")="Immunization Date" ; ALL ARE THE SAME
. . S @VMAP@("IMMUNEDATETIME")=C0CT ;FORMATTED DATE/TIME
. . S C0CIP=$$ZVALUEI^C0CRNF("ENCOUNTER PROVIDER","C0CI") ;IEN OF PROVIDER
. . S @VMAP@("IMMUNESOURCEACTORID")="ACTORPROVIDOR_"_C0CIP
. . S C0CIIEN=$$ZVALUEI^C0CRNF("IMMUNIZATION","C0CI") ;IEN OF IMMUNIZATION
. . ; FOR LOOKING UP THE CODE (TBD GPL)
. . S C0CIN=$$ZVALUE^C0CRNF("IMMUNIZATION","C0CI") ;NAME OF IMMUNIZATION
. . ; GET IT FROM THE CODE FILE CHANGE THIS (TBD GPL)
. . S @VMAP@("IMMUNEPRODUCTNAMETEXT")=C0CIN ;NAME
. . S @VMAP@("IMMUNEPRODUCTCODE")="" ;FIX THIS
. . S @VMAP@("IMMUNEPRODUCTCODESYSTEM")="" ;FIX THIS
B
Q
. S VMAP=$NA(@TVMAP@(J))
. K @VMAP