Changeset 75 for ccr/trunk


Ignore:
Timestamp:
Jul 26, 2008, 3:16:58 PM (16 years ago)
Author:
George Lilly
Message:

second CCD commit

Location:
ccr/trunk/p
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/GPLACTORS.m

    r71 r75  
    5050           . I ATYP="PATIENT" D  ; PATIENT ACTOR TYPE
    5151           . . D QUERY^GPLXPATH(IPXML,"//Actors/ACTOR-PATIENT","ATMP")
    52            . . D PATIENT("ATMP",@ALST@(I),"ATMP2")
     52           . . D PATIENT("ATMP",AIEN,AOID,"ATMP2")
    5353           . ;
    5454           . I ATYP="SYSTEM" D  ; SYSTEM ACTOR TYPE
    5555           . . D QUERY^GPLXPATH(IPXML,"//Actors/ACTOR-SYSTEM","ATMP")
    56            . . D SYSTEM("ATMP",@ALST@(I),"ATMP2")
     56           . . D SYSTEM("ATMP",AIEN,AOID,"ATMP2")
    5757           . ;
    5858           . I ATYP="NOK" D  ; NOK ACTOR TYPE
    5959           . . D QUERY^GPLXPATH(IPXML,"//Actors/ACTOR-NOK","ATMP")
    60            . . D NOK("ATMP",@ALST@(I),"ATMP2")
     60           . . D NOK("ATMP",AIEN,AOID,"ATMP2")
    6161           . ;
    6262           . I ATYP="PROVIDER" D  ; PROVIDER ACTOR TYPE
    6363           . . D QUERY^GPLXPATH(IPXML,"//Actors/ACTOR-PROVIDER","ATMP")
    64            . . D PROVIDER("ATMP",@ALST@(I),"ATMP2")
     64           . . D PROVIDER("ATMP",AIEN,AOID,"ATMP2")
    6565           . ;
    6666           . I ATYP="ORGANIZATION" D  ; PROVIDER ACTOR TYPE
    6767           . . D QUERY^GPLXPATH(IPXML,"//Actors/ACTOR-ORG","ATMP")
    68            . . D ORG("ATMP",@ALST@(I),"ATMP2")
     68           . . D ORG("ATMP",AIEN,AOID,"ATMP2")
    6969           . ;
    7070           . D INSINNER^GPLXPATH(AXML,"ATMP2") ; INSERT INTO ROOT
     
    7777           Q
    7878           ;
    79 PATIENT(INXML,ACTREC,OUTXML) ; PROCESS A PATIENT ACTOR
     79PATIENT(INXML,AIEN,AOID,OUTXML) ; PROCESS A PATIENT ACTOR
    8080     ;
    81      W "PROCESSING ACTOR PATIENT ",ACTREC,!
     81     W "PROCESSING ACTOR PATIENT ",AIEN,!
    8282     ; N AMAP
    8383     S AMAP=$NA(^TMP($J,"AMAP"))
     84     K @AMAP
    8485         D INIT^CCRDPT(AIEN)
    8586     S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID
     
    102103     S @AMAP@("ACTOREMAIL")=$$EMAIL^CCRDPT
    103104     S @AMAP@("ACTORADDRESSSOURCEID")=AOID
     105     S @AMAP@("ACTORIEN")=AIEN
     106     S @AMAP@("ACTORSUFFIXNAME")="" ; DOES VISTA STORE THE SUFFIX?
    104107         D DESTROY^CCRDPT
    105108     D MAP^GPLXPATH(INXML,AMAP,OUTXML) ; MAP THE VARIABLE
    106109     Q
    107110     ;
    108 SYSTEM(INXML,ACTREC,OUTXML) ; PROCESS A SYSTEM ACTOR
     111SYSTEM(INXML,AIEN,AOID,OUTXML) ; PROCESS A SYSTEM ACTOR
    109112     ;
    110113     ; N AMAP
    111114     S AMAP=$NA(^TMP($J,"AMAP"))
     115     K @AMAP
    112116     S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID
    113117     S @AMAP@("ACTORINFOSYSNAME")=$$SYSNAME^CCRSYS
     
    117121     Q
    118122     ;
    119 NOK(INXML,ACTREC,OUTXML) ; PROCESS A NEXT OF KIN TYPE ACTOR
     123NOK(INXML,AIEN,AOID,OUTXML) ; PROCESS A NEXT OF KIN TYPE ACTOR
    120124     ;
    121125     ; N AMAP
    122126     S AMAP=$NA(^TMP($J,"AMAP"))
     127     K @AMAP
    123128     S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID
    124129     S @AMAP@("ACTORDISPLAYNAME")=""
     
    128133     Q
    129134     ;
    130 ORG(INXML,ACTREC,OUTXML) ; PROCESS AN ORGANIZATION TYPE ACTOR
     135ORG(INXML,AIEN,AOID,OUTXML) ; PROCESS AN ORGANIZATION TYPE ACTOR
    131136     ;
    132137     ; N AMAP
    133138     S AMAP=$NA(^TMP($J,"AMAP"))
     139     K @AMAP
    134140     S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID
    135141     S @AMAP@("ORGANIZATIONNAME")=$P($$SITE^VASITE,U,2)
     
    138144     Q
    139145     ;
    140 PROVIDER(INXML,ACTREC,OUTXML) ; PROCESS A PROVIDER TYPE ACTOR
     146PROVIDER(INXML,AIEN,AOID,OUTXML) ; PROCESS A PROVIDER TYPE ACTOR
    141147     ;
    142148     ; N AMAP
    143149     S AMAP=$NA(^TMP($J,"AMAP"))
     150     K @AMAP
    144151     S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID
    145152     S @AMAP@("ACTORGIVENNAME")=$$GIVEN^CCRVA200(AIEN)
  • ccr/trunk/p/GPLCCD.m

    r74 r75  
    2626       S DFN=$P(Y,U,1) ; SET THE PATIENT
    2727       ; N CCRGLO
    28        D CCRRPC(.CCRGLO,DFN,"CCD","","","")
     28       D CCDRPC(.CCRGLO,DFN,"CCD","","","")
    2929       S OARY=$NA(^TMP("GPLCCR",$J,DFN,"CCD",1))
    3030       S ONAM="PAT_"_DFN_"_CCD_V1.xml"
     
    3838       Q
    3939       ;
    40 CCRRPC(CCRGRTN,DFN,CCRPART,TIME1,TIME2,HDRARY)  ;RPC ENTRY POINT FOR CCR OUTPUT
     40CCDRPC(CCRGRTN,DFN,CCRPART,TIME1,TIME2,HDRARY)  ;RPC ENTRY POINT FOR CCR OUTPUT
    4141    ; CCRGRTN IS RETURN ARRAY PASSED BY NAME
    4242    ; DFN IS PATIENT IEN
     
    4848    ; HDRARY IS THE HEADER ARRAY DEFINING THE "FROM" AND
    4949    ;    "TO" VARIABLES
    50     ;    IF NULL WILL DEFAULT TO "FROM" DUZ AND "TO" DFN
     50    ;    IF NULL WILL DEFAULT TO "FROM" ORGANIZATION AND "TO" DFN
    5151    S DEBUG=0
    5252    N CCD S CCD=0 ; FLAG FOR PROCESSING A CCD
     
    6161    E  D LOAD^GPLCCR0(TGLOBAL)  ; LOAD THE CCR TEMPLATE
    6262    D CP^GPLXPATH(TGLOBAL,CCRGLO) ; COPY THE TEMPLATE TO CCR GLOBAL
     63    N CAPSAVE,CAPSAVE2 ; FOR HOLDING THE CCD ROOT LINES
    6364    S CAPSAVE=@TGLOBAL@(3) ; SAVE THE CCD ROOT
    6465    S CAPSAVE2=@TGLOBAL@(@TGLOBAL@(0)) ; SAVE LAST LINE OF CCD
     
    7576    I DEBUG F I=1:1:@CCRGLO@(0) W @CCRGLO@(I),!
    7677    ;
    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)
    7891    ;
    7992    K ^TMP("GPLCCR",$J,"CCRSTEP") ; KILL GLOBAL PRIOR TO ADDING TO IT
     
    99112    . D INSERT^GPLXPATH(CCRGLO,OXML,"//ContinuityOfCareRecord/Body")
    100113    . 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")
    105119    N I,J,DONE S DONE=0
    106120    F I=0:0 D  Q:DONE ; DELETE UNTIL ALL EMPTY ELEMENTS ARE GONE
  • ccr/trunk/p/GPLCCD1.m

    r74 r75  
    9595 ;;<id root="db734647-fc99-424c-a864-7e3cda82e703"/>
    9696 ;;<code code="34133-9" codeSystem="2.16.840.1.113883.6.1" displayName="Summarization of episode note"/>
    97  ;;<title>Good Health Clinic Continuity of Care Document</title>
     97 ;;<title>Continuity of Care Document</title>
    9898 ;;<effectiveTime value="20000407130000+0500"/>
    9999 ;;<confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/>
     
    101101 ;;<recordTarget>
    102102 ;;<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"/>
    104104 ;;<patient>
    105105 ;;<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@@"/>
    112112 ;;</patient>
    113113 ;;<providerOrganization>
    114114 ;;<id root="2.16.840.1.113883.19.5"/>
    115  ;;<name>Good Health Clinic</name>
     115 ;;<name>@@ORGANIZATIONNAME@@</name>
    116116 ;;</providerOrganization>
    117117 ;;</patientRole>
     
    123123 ;;<assignedPerson>
    124124 ;;<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>
    128128 ;;</name>
    129129 ;;</assignedPerson>
    130130 ;;<representedOrganization>
    131131 ;;<id root="2.16.840.1.113883.19.5"/>
    132  ;;<name>Good Health Clinic</name>
     132 ;;<name>@@ORGANIZATIONNAME@@</name>
    133133 ;;</representedOrganization>
    134134 ;;</assignedAuthor>
     
    139139 ;;<representedOrganization>
    140140 ;;<id root="2.16.840.1.113883.19.5"/>
    141  ;;<name>Good Health Clinic</name>
     141 ;;<name>@@ORGANIZATIONNAME@@</name>
    142142 ;;</representedOrganization>
    143143 ;;</assignedEntity>
     
    147147 ;;<representedCustodianOrganization>
    148148 ;;<id root="2.16.840.1.113883.19.5"/>
    149  ;;<name>Good Health Clinic</name>
     149 ;;<name>@@ORGANIZATIONNAME@@</name>
    150150 ;;</representedCustodianOrganization>
    151151 ;;</assignedCustodian>
     
    158158 ;;<representedOrganization>
    159159 ;;<id root="2.16.840.1.113883.19.5"/>
    160  ;;<name>Good Health Clinic</name>
     160 ;;<name>@@ORGANIZATIONNAME@@</name>
    161161 ;;</representedOrganization>
    162162 ;;</assignedEntity>
    163163 ;;</legalAuthenticator>
    164164 ;;<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>
    183166 ;;<participant typeCode="IND">
    184167 ;;<associatedEntity classCode="NOK">
     
    194177 ;;</associatedEntity>
    195178 ;;</participant>
     179 ;;</ACTOR-NOK>
    196180 ;;</Actors>
    197181 ;;<documentationOf>
    198182 ;;<serviceEvent classCode="PCPR">
    199183 ;;<effectiveTime>
    200  ;;<low value="19320924"/>
    201  ;;<high value="20000407"/>
     184 ;;<high value="@@DATETIME@@"/>
    202185 ;;</effectiveTime>
    203186 ;;<performer typeCode="PRF">
     
    211194 ;;<assignedPerson>
    212195 ;;<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>
    216199 ;;</name>
    217200 ;;</assignedPerson>
    218201 ;;<representedOrganization>
    219202 ;;<id root="2.16.840.1.113883.19.5"/>
    220  ;;<name>Good Health Clinic</name>
     203 ;;<name>@@ORGANIZATIONNAME@@</name>
    221204 ;;</representedOrganization>
    222205 ;;</assignedEntity>
  • ccr/trunk/p/GPLXPATH.m

    r74 r75  
    309309         S XFIRST=$P(XNODE,"^",1)
    310310         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
    312314         I RENEW'="" D  ; NEW XML IS NOT NULL
     315         . D QUEUE("REBLD",REXML,1,XFIRST-1) ; THE BEFORE
    313316         . D QUEUE("REBLD",RENEW,1,@RENEW@(0)) ; THE NEW
    314          D QUEUE("REBLD",REXML,XLAST,@REXML@(0)) ; THE REST
    315          I DEBUG W "REPALCE PREBUILD",!
     317         . D QUEUE("REBLD",REXML,XLAST+1,@REXML@(0)) ; THE REST
     318         I DEBUG W "REPLACE PREBUILD",!
    316319         I DEBUG D PARY("REBLD")
    317320         D BUILD("REBLD","RTMP")
     
    361364         . . . W "IN MAPPING LOOP: ",TSTR,!
    362365         . . . S TNAM=$P(@OXML@(I),"@@",J) ; EXTRACT THE VARIABLE NAME
    363          . . . S TVAL="" ; DEFAULT FOR UNMAPPED VARIABLES
     366         . . . S TVAL="@@"_$P(@IXML@(I),"@@",J)_"@@" ; DEFAULT UNCHANGED
    364367         . . . I $D(@INARY@(TNAM))  D  ; IS THE VARIABLE IN THE MAP?
    365368         . . . . S TVAL=@INARY@(TNAM) ; PULL OUT MAPPED VALUE
Note: See TracChangeset for help on using the changeset viewer.