- Timestamp:
- Jul 26, 2008, 3:16:58 PM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLACTORS.m
r71 r75 50 50 . I ATYP="PATIENT" D ; PATIENT ACTOR TYPE 51 51 . . D QUERY^GPLXPATH(IPXML,"//Actors/ACTOR-PATIENT","ATMP") 52 . . D PATIENT("ATMP", @ALST@(I),"ATMP2")52 . . D PATIENT("ATMP",AIEN,AOID,"ATMP2") 53 53 . ; 54 54 . I ATYP="SYSTEM" D ; SYSTEM ACTOR TYPE 55 55 . . D QUERY^GPLXPATH(IPXML,"//Actors/ACTOR-SYSTEM","ATMP") 56 . . D SYSTEM("ATMP", @ALST@(I),"ATMP2")56 . . D SYSTEM("ATMP",AIEN,AOID,"ATMP2") 57 57 . ; 58 58 . I ATYP="NOK" D ; NOK ACTOR TYPE 59 59 . . D QUERY^GPLXPATH(IPXML,"//Actors/ACTOR-NOK","ATMP") 60 . . D NOK("ATMP", @ALST@(I),"ATMP2")60 . . D NOK("ATMP",AIEN,AOID,"ATMP2") 61 61 . ; 62 62 . I ATYP="PROVIDER" D ; PROVIDER ACTOR TYPE 63 63 . . D QUERY^GPLXPATH(IPXML,"//Actors/ACTOR-PROVIDER","ATMP") 64 . . D PROVIDER("ATMP", @ALST@(I),"ATMP2")64 . . D PROVIDER("ATMP",AIEN,AOID,"ATMP2") 65 65 . ; 66 66 . I ATYP="ORGANIZATION" D ; PROVIDER ACTOR TYPE 67 67 . . D QUERY^GPLXPATH(IPXML,"//Actors/ACTOR-ORG","ATMP") 68 . . D ORG("ATMP", @ALST@(I),"ATMP2")68 . . D ORG("ATMP",AIEN,AOID,"ATMP2") 69 69 . ; 70 70 . D INSINNER^GPLXPATH(AXML,"ATMP2") ; INSERT INTO ROOT … … 77 77 Q 78 78 ; 79 PATIENT(INXML,A CTREC,OUTXML) ; PROCESS A PATIENT ACTOR79 PATIENT(INXML,AIEN,AOID,OUTXML) ; PROCESS A PATIENT ACTOR 80 80 ; 81 W "PROCESSING ACTOR PATIENT ",A CTREC,!81 W "PROCESSING ACTOR PATIENT ",AIEN,! 82 82 ; N AMAP 83 83 S AMAP=$NA(^TMP($J,"AMAP")) 84 K @AMAP 84 85 D INIT^CCRDPT(AIEN) 85 86 S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID … … 102 103 S @AMAP@("ACTOREMAIL")=$$EMAIL^CCRDPT 103 104 S @AMAP@("ACTORADDRESSSOURCEID")=AOID 105 S @AMAP@("ACTORIEN")=AIEN 106 S @AMAP@("ACTORSUFFIXNAME")="" ; DOES VISTA STORE THE SUFFIX? 104 107 D DESTROY^CCRDPT 105 108 D MAP^GPLXPATH(INXML,AMAP,OUTXML) ; MAP THE VARIABLE 106 109 Q 107 110 ; 108 SYSTEM(INXML,A CTREC,OUTXML) ; PROCESS A SYSTEM ACTOR111 SYSTEM(INXML,AIEN,AOID,OUTXML) ; PROCESS A SYSTEM ACTOR 109 112 ; 110 113 ; N AMAP 111 114 S AMAP=$NA(^TMP($J,"AMAP")) 115 K @AMAP 112 116 S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID 113 117 S @AMAP@("ACTORINFOSYSNAME")=$$SYSNAME^CCRSYS … … 117 121 Q 118 122 ; 119 NOK(INXML,A CTREC,OUTXML) ; PROCESS A NEXT OF KIN TYPE ACTOR123 NOK(INXML,AIEN,AOID,OUTXML) ; PROCESS A NEXT OF KIN TYPE ACTOR 120 124 ; 121 125 ; N AMAP 122 126 S AMAP=$NA(^TMP($J,"AMAP")) 127 K @AMAP 123 128 S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID 124 129 S @AMAP@("ACTORDISPLAYNAME")="" … … 128 133 Q 129 134 ; 130 ORG(INXML,A CTREC,OUTXML) ; PROCESS AN ORGANIZATION TYPE ACTOR135 ORG(INXML,AIEN,AOID,OUTXML) ; PROCESS AN ORGANIZATION TYPE ACTOR 131 136 ; 132 137 ; N AMAP 133 138 S AMAP=$NA(^TMP($J,"AMAP")) 139 K @AMAP 134 140 S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID 135 141 S @AMAP@("ORGANIZATIONNAME")=$P($$SITE^VASITE,U,2) … … 138 144 Q 139 145 ; 140 PROVIDER(INXML,A CTREC,OUTXML) ; PROCESS A PROVIDER TYPE ACTOR146 PROVIDER(INXML,AIEN,AOID,OUTXML) ; PROCESS A PROVIDER TYPE ACTOR 141 147 ; 142 148 ; N AMAP 143 149 S AMAP=$NA(^TMP($J,"AMAP")) 150 K @AMAP 144 151 S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID 145 152 S @AMAP@("ACTORGIVENNAME")=$$GIVEN^CCRVA200(AIEN) -
ccr/trunk/p/GPLCCD.m
r74 r75 26 26 S DFN=$P(Y,U,1) ; SET THE PATIENT 27 27 ; N CCRGLO 28 D CC RRPC(.CCRGLO,DFN,"CCD","","","")28 D CCDRPC(.CCRGLO,DFN,"CCD","","","") 29 29 S OARY=$NA(^TMP("GPLCCR",$J,DFN,"CCD",1)) 30 30 S ONAM="PAT_"_DFN_"_CCD_V1.xml" … … 38 38 Q 39 39 ; 40 CC RRPC(CCRGRTN,DFN,CCRPART,TIME1,TIME2,HDRARY) ;RPC ENTRY POINT FOR CCR OUTPUT40 CCDRPC(CCRGRTN,DFN,CCRPART,TIME1,TIME2,HDRARY) ;RPC ENTRY POINT FOR CCR OUTPUT 41 41 ; CCRGRTN IS RETURN ARRAY PASSED BY NAME 42 42 ; DFN IS PATIENT IEN … … 48 48 ; HDRARY IS THE HEADER ARRAY DEFINING THE "FROM" AND 49 49 ; "TO" VARIABLES 50 ; IF NULL WILL DEFAULT TO "FROM" DUZAND "TO" DFN50 ; IF NULL WILL DEFAULT TO "FROM" ORGANIZATION AND "TO" DFN 51 51 S DEBUG=0 52 52 N CCD S CCD=0 ; FLAG FOR PROCESSING A CCD … … 61 61 E D LOAD^GPLCCR0(TGLOBAL) ; LOAD THE CCR TEMPLATE 62 62 D CP^GPLXPATH(TGLOBAL,CCRGLO) ; COPY THE TEMPLATE TO CCR GLOBAL 63 N CAPSAVE,CAPSAVE2 ; FOR HOLDING THE CCD ROOT LINES 63 64 S CAPSAVE=@TGLOBAL@(3) ; SAVE THE CCD ROOT 64 65 S CAPSAVE2=@TGLOBAL@(@TGLOBAL@(0)) ; SAVE LAST LINE OF CCD … … 75 76 I DEBUG F I=1:1:@CCRGLO@(0) W @CCRGLO@(I),! 76 77 ; 77 D HDRMAP(CCRGLO,DFN,HDRARY) ; MAP HEADER VARIABLES 78 I 'CCD D HDRMAP(CCRGLO,DFN,HDRARY) ; MAP HEADER VARIABLES 79 ; MAPPING THE PATIENT PORTION OF THE CDA HEADER 80 S ZX="//ContinuityOfCareRecord/recordTarget/patientRole/patient" 81 D QUERY^GPLXPATH(CCRGLO,ZX,"ACTT1") 82 D PATIENT^GPLACTORS("ACTT1",DFN,"ACTORPATIENT_"_DFN,"ACTT2") ; MAP PATIENT 83 D PARY^GPLXPATH("ACTT2") 84 D REPLACE^GPLXPATH(CCRGLO,"ACTT2",ZX) 85 D PARY^GPLXPATH(CCRGLO) 86 K ACTT1 K ACCT2 87 ; MAPPING THE PROVIDER ORGANIZATION,AUTHOR,INFORMANT,CUSTODIAN CDA HEADER 88 ; FOR NOW, THEY ARE ALL THE SAME AND RESOLVE TO ORGANIZATION 89 D ORG^GPLACTORS(CCRGLO,DFN,"ACTORPATIENTORGANIZATION","ACTT2") ; MAP ORG 90 D CP^GPLXPATH("ACTT2",CCRGLO) 78 91 ; 79 92 K ^TMP("GPLCCR",$J,"CCRSTEP") ; KILL GLOBAL PRIOR TO ADDING TO IT … … 99 112 . D INSERT^GPLXPATH(CCRGLO,OXML,"//ContinuityOfCareRecord/Body") 100 113 . I DEBUG F GPLI=1:1:@OXML@(0) W @OXML@(GPLI),! 101 D ACTLST^GPLCCR(CCRGLO,ACTGLO) ; GEN THE ACTOR LIST 102 D QUERY^GPLXPATH(TGLOBAL,"//ContinuityOfCareRecord/Actors","ACTT") 103 D EXTRACT^GPLACTORS("ACTT",ACTGLO,"ACTT2") 104 D INSINNER^GPLXPATH(CCRGLO,"ACTT2","//ContinuityOfCareRecord/Actors") 114 ; NEED TO ADD BACK IN ACTOR PROCESSING AFTER WE FIGURE OUT LINKAGE 115 ; D ACTLST^GPLCCR(CCRGLO,ACTGLO) ; GEN THE ACTOR LIST 116 ; D QUERY^GPLXPATH(TGLOBAL,"//ContinuityOfCareRecord/Actors","ACTT") 117 ; D EXTRACT^GPLACTORS("ACTT",ACTGLO,"ACTT2") 118 ; D INSINNER^GPLXPATH(CCRGLO,"ACTT2","//ContinuityOfCareRecord/Actors") 105 119 N I,J,DONE S DONE=0 106 120 F I=0:0 D Q:DONE ; DELETE UNTIL ALL EMPTY ELEMENTS ARE GONE -
ccr/trunk/p/GPLCCD1.m
r74 r75 95 95 ;;<id root="db734647-fc99-424c-a864-7e3cda82e703"/> 96 96 ;;<code code="34133-9" codeSystem="2.16.840.1.113883.6.1" displayName="Summarization of episode note"/> 97 ;;<title> Good Health ClinicContinuity of Care Document</title>97 ;;<title>Continuity of Care Document</title> 98 98 ;;<effectiveTime value="20000407130000+0500"/> 99 99 ;;<confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/> … … 101 101 ;;<recordTarget> 102 102 ;;<patientRole> 103 ;;<id extension=" 996-756-495" root="2.16.840.1.113883.19.5"/>103 ;;<id extension="@@ACTORIEN@@" root="2.16.840.1.113883.19.5"/> 104 104 ;;<patient> 105 105 ;;<name> 106 ;;<given> Henry</given>107 ;;<family> Levin</family>108 ;;<suffix> the 7th</suffix>109 ;;</name> 110 ;;<administrativeGenderCode code=" M" codeSystem="2.16.840.1.113883.5.1"/>111 ;;<birthTime value=" 19320924"/>106 ;;<given>@@ACTORGIVENNAME@@</given> 107 ;;<family>@@ACTORFAMILYNAME@@</family> 108 ;;<suffix>@@ACTORSUFFIXNAME@@</suffix> 109 ;;</name> 110 ;;<administrativeGenderCode code="@@ACTORGENDER@@" codeSystem="2.16.840.1.113883.5.1"/> 111 ;;<birthTime value="@@ACTORDATEOFBIRTH@@"/> 112 112 ;;</patient> 113 113 ;;<providerOrganization> 114 114 ;;<id root="2.16.840.1.113883.19.5"/> 115 ;;<name> Good Health Clinic</name>115 ;;<name>@@ORGANIZATIONNAME@@</name> 116 116 ;;</providerOrganization> 117 117 ;;</patientRole> … … 123 123 ;;<assignedPerson> 124 124 ;;<name> 125 ;;<prefix> Dr.</prefix>126 ;;<given> Robert</given>127 ;;<family> Dolin</family>125 ;;<prefix>@@ACTORNAMEPREFIX@@</prefix> 126 ;;<given>@@ACTORGIVENNAME@@</given> 127 ;;<family>@@ACTORFAMILYNAME@@</family> 128 128 ;;</name> 129 129 ;;</assignedPerson> 130 130 ;;<representedOrganization> 131 131 ;;<id root="2.16.840.1.113883.19.5"/> 132 ;;<name> Good Health Clinic</name>132 ;;<name>@@ORGANIZATIONNAME@@</name> 133 133 ;;</representedOrganization> 134 134 ;;</assignedAuthor> … … 139 139 ;;<representedOrganization> 140 140 ;;<id root="2.16.840.1.113883.19.5"/> 141 ;;<name> Good Health Clinic</name>141 ;;<name>@@ORGANIZATIONNAME@@</name> 142 142 ;;</representedOrganization> 143 143 ;;</assignedEntity> … … 147 147 ;;<representedCustodianOrganization> 148 148 ;;<id root="2.16.840.1.113883.19.5"/> 149 ;;<name> Good Health Clinic</name>149 ;;<name>@@ORGANIZATIONNAME@@</name> 150 150 ;;</representedCustodianOrganization> 151 151 ;;</assignedCustodian> … … 158 158 ;;<representedOrganization> 159 159 ;;<id root="2.16.840.1.113883.19.5"/> 160 ;;<name> Good Health Clinic</name>160 ;;<name>@@ORGANIZATIONNAME@@</name> 161 161 ;;</representedOrganization> 162 162 ;;</assignedEntity> 163 163 ;;</legalAuthenticator> 164 164 ;;<Actors> 165 ;;<participant typeCode="IND"> 166 ;;<associatedEntity classCode="GUAR"> 167 ;;<id root="4ff51570-83a9-47b7-91f2-93ba30373141"/> 168 ;;<addr> 169 ;;<streetAddressLine>17 Daws Rd.</streetAddressLine> 170 ;;<city>Blue Bell</city> 171 ;;<state>MA</state> 172 ;;<postalCode>02368</postalCode> 173 ;;</addr> 174 ;;<telecom value="tel:(888)555-1212"/> 175 ;;<associatedPerson> 176 ;;<name> 177 ;;<given>Kenneth</given> 178 ;;<family>Ross</family> 179 ;;</name> 180 ;;</associatedPerson> 181 ;;</associatedEntity> 182 ;;</participant> 165 ;;<ACTOR-NOK> 183 166 ;;<participant typeCode="IND"> 184 167 ;;<associatedEntity classCode="NOK"> … … 194 177 ;;</associatedEntity> 195 178 ;;</participant> 179 ;;</ACTOR-NOK> 196 180 ;;</Actors> 197 181 ;;<documentationOf> 198 182 ;;<serviceEvent classCode="PCPR"> 199 183 ;;<effectiveTime> 200 ;;<low value="19320924"/> 201 ;;<high value="20000407"/> 184 ;;<high value="@@DATETIME@@"/> 202 185 ;;</effectiveTime> 203 186 ;;<performer typeCode="PRF"> … … 211 194 ;;<assignedPerson> 212 195 ;;<name> 213 ;;<prefix> Dr.</prefix>214 ;;<given> Robert</given>215 ;;<family> Dolin</family>196 ;;<prefix>@@ACTORPREFIXNAME@@</prefix> 197 ;;<given>@@ACTORGIVENNAME@@</given> 198 ;;<family>@@ACTORFAMILYNAME@@</family> 216 199 ;;</name> 217 200 ;;</assignedPerson> 218 201 ;;<representedOrganization> 219 202 ;;<id root="2.16.840.1.113883.19.5"/> 220 ;;<name> Good Health Clinic</name>203 ;;<name>@@ORGANIZATIONNAME@@</name> 221 204 ;;</representedOrganization> 222 205 ;;</assignedEntity> -
ccr/trunk/p/GPLXPATH.m
r74 r75 309 309 S XFIRST=$P(XNODE,"^",1) 310 310 S XLAST=$P(XNODE,"^",2) 311 D QUEUE("REBLD",REXML,1,XFIRST) ; THE BEFORE 311 I RENEW="" D ; WE ARE DELETING A SECTION, MUST SAVE THE TAG 312 . D QUEUE("REBLD",REXML,1,XFIRST) ; THE BEFORE 313 . D QUEUE("REBLD",REXML,XLAST,@REXML@(0)) ; THE REST 312 314 I RENEW'="" D ; NEW XML IS NOT NULL 315 . D QUEUE("REBLD",REXML,1,XFIRST-1) ; THE BEFORE 313 316 . D QUEUE("REBLD",RENEW,1,@RENEW@(0)) ; THE NEW 314 D QUEUE("REBLD",REXML,XLAST,@REXML@(0)) ; THE REST315 I DEBUG W "REP ALCE PREBUILD",!317 . D QUEUE("REBLD",REXML,XLAST+1,@REXML@(0)) ; THE REST 318 I DEBUG W "REPLACE PREBUILD",! 316 319 I DEBUG D PARY("REBLD") 317 320 D BUILD("REBLD","RTMP") … … 361 364 . . . W "IN MAPPING LOOP: ",TSTR,! 362 365 . . . S TNAM=$P(@OXML@(I),"@@",J) ; EXTRACT THE VARIABLE NAME 363 . . . S TVAL=" " ; DEFAULT FOR UNMAPPED VARIABLES366 . . . S TVAL="@@"_$P(@IXML@(I),"@@",J)_"@@" ; DEFAULT UNCHANGED 364 367 . . . I $D(@INARY@(TNAM)) D ; IS THE VARIABLE IN THE MAP? 365 368 . . . . S TVAL=@INARY@(TNAM) ; PULL OUT MAPPED VALUE
Note:
See TracChangeset
for help on using the changeset viewer.