new import processing

This commit is contained in:
george 2009-10-27 23:32:34 +00:00
parent 4ae722ac6a
commit 5ada1c8aff
2 changed files with 8 additions and 4 deletions

View File

@ -281,7 +281,6 @@ LOAD(ARY) ; LOAD A CCR TEMPLATE INTO ARY PASSED BY NAME
;;<ActorID>@@ALERTSOURCEID@@</ActorID>
;;</Actor>
;;</Source>
;;<Product>
;;<ProductName>
;;<Text>@@ALERTAGENTPRODUCTNAMETEXT@@</Text>
;;<Code>
@ -290,7 +289,6 @@ LOAD(ARY) ; LOAD A CCR TEMPLATE INTO ARY PASSED BY NAME
;;</Code>
;;</ProductName>
;;</Product>
;;</Product>
;;</Products>
;;</Agent>
;;<Reaction>

View File

@ -25,7 +25,11 @@ EN(INXML,SOURCE,C0CDFN) ; IMPORT A CCR, PASSED BY NAME INXML
; FOR PATIENT C0CDFN
;N C0CXP
S C0CINB=$NA(^TMP("C0CIN",$J,"VARS",C0CDFN))
D INDEX^C0CXPATH(INXML,"C0CXP",-1) ; GENERATE XPATHS FROM THE CCR
S C0CDOCID=$$PARSE^C0CMXML(INXML) ;W !,"DocID: ",C0CDOCID
;S REDUX="//ContinuityOfCareRecord/Body"
S REDUX=""
D XPATH^C0CMXML(1,"/","C0CIDX","C0CXP",,REDUX)
;D INDEX^C0CXPATH(INXML,"C0CXP",-1) ; GENERATE XPATHS FROM THE CCR
;N ZI,ZJ,ZK
S ZI=""
F S ZI=$O(C0CXP(ZI)) Q:ZI="" D ; FOR EACH XPATH
@ -35,7 +39,9 @@ EN(INXML,SOURCE,C0CDFN) ; IMPORT A CCR, PASSED BY NAME INXML
. S ZM=$P(ZJ,"^",1) ; PULL OUT THE MULTIPLE
. S ZS=$P(ZJ,"^",2) ; PULL OUT THE SUBMULTIPLE
. S C0CDICN=$O(^C0CDIC(170,"XPATH",ZK,""))
. I C0CDICN="" W "MISSING XPATH:",!,ZK,! Q ; OOPS, XPATH NOT IN C0CDIC
. I C0CDICN="" D Q ;
. . W "MISSING XPATH:",!,ZK,! ; OOPS, XPATH NOT IN C0CDIC
. . S MISSING(ZK)=""
. ;D GETS^DIQ(170,C0CDICN_",","*",,"C0CFDA")
. S C0CVAR=$$GET1^DIQ(170,C0CDICN_",",.01) ; VARIABLE NAME
. S C0CSEC=$$GET1^DIQ(170,C0CDICN_",",12) ;ELEMENT TYPE