Changeset 36


Ignore:
Timestamp:
Jul 3, 2008, 4:54:25 PM (16 years ago)
Author:
Christopher Edwards
Message:

switch proccessing of vitals and problems so CCR would validate
added date time for ccr
cleaned up template ccr (more to come)
more work done in vitals section

Location:
ccr/trunk/p
Files:
4 edited

Legend:

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

    r15 r36  
    1 CCRUTIL ;CCRCCD/SMH - Various Utilites for generating the CCR/CCD;06/15/08
     1CCRUTIL ;CCRCCD/SMH - Various Utilites for generating the CCR/CCD;06/15/08
    22        ;;0.1;CCRCCD;;Jun 15, 2008;
    3 
     3       
    44        W "No Entry at Top!" Q
    5 
    6 FMDTOUTC(DATE,FORMAT) ; Convert Fileman Date to UTC Date Format; PUBLIC; Extrinsic
     5       
     6FMDTOUTC(DATE,FORMAT)   ; Convert Fileman Date to UTC Date Format; PUBLIC; Extrinsic
    77        ; FORMAT is Format of Date. Can be either D (Day) or DT (Date and Time)
    88        ; If not passed, or passed incorrectly, it's assumed that it is D.
     
    1616        S H=$E(DATE,9,10)
    1717        S MM=$E(DATE,11,12)
    18         S S=$E(DATE,12,13)
     18        S S=$E(DATE,13,14)
    1919        S OFF=$$TZ^XLFDT ; See Kernel Manual for documentation.
    2020        ; If H, MM and S are empty, it means that the FM date didn't supply the time.
    2121        ; In this case, set H, MM and S to "00"
    2222        S:('$L(H)&'$L(MM)&'$L(S)) (H,MM,S)="00"
    23         S UTC=Y_"-"_M_"-"_D_"T"_H_":"_MM_":"_S_OFF
     23        I S="" S UTC=Y_"-"_M_"-"_D_"T"_H_":"_MM_OFF
     24        E  S UTC=Y_"-"_M_"-"_D_"T"_H_":"_MM_":"_S_OFF
    2425        I $L($G(FORMAT)),FORMAT="DT" Q UTC ; Date with time.
    2526        E  Q $P(UTC,"T")
  • ccr/trunk/p/GPLCCR.m

    r35 r36  
    1 GPLCCR  ; CCDCCR/GPL - CCR MAIN PROCESSING; 6/6/08
    2         ;;0.1;CCDCCR;nopatch;noreleasedate
    3         ;
    4         ; EXPORT A CCR
    5         ;
    6 EXPORT  ; EXPORT ENTRY POINT FOR CCR
    7                ; Select a patient.
    8                S DIC=2,DIC(0)="AEMQ" D ^DIC
    9                I Y<1 Q ; EXIT
    10                S DFN=$P(Y,U,1) ; SET THE PATIENT
    11                N CCRGLO
    12                D CCRRPC(.CCRGLO,DFN,"CCR","","","")
    13                S OARY=$NA(^TMP($J,DFN,"CCR",1))
    14                S ONAM="PAT_"_DFN_"_CCR_V1.xml"
    15                S ODIR="/home/glilly/CCROUT"
    16                ;S ODIR="/home/cedwards/"
    17                D OUTPUT^GPLXPATH(OARY,ONAM,ODIR)
    18                Q
    19                ;
    20 CCRRPC(CCRGRTN,DFN,CCRPART,TIME1,TIME2,HDRARY) ;RPC ENTRY POINT FOR CCR OUTPUT
    21                ; CCRGRTN IS RETURN ARRAY PASSED BY NAME
    22                ; DFN IS PATIENT IEN
    23                ; CCRPART IS "CCR" FOR ENTIRE CCR, OR SECTION NAME FOR A PART
    24                ;   OF THE CCR BODY.. PARTS INCLUDE "PROBLEMS" "VITALS" ETC
    25                ; TIME1 IS STARTING TIME TO INCLUDE - NULL MEANS ALL
    26                ; TIME2 IS ENDING TIME TO INCLUDE TIME IS FILEMAN TIME
    27                ; - NULL MEANS NOW
    28                ; HDRARY IS THE HEADER ARRAY DEFINING THE "FROM" AND
    29                ;    "TO" VARIABLES
    30                ;    IF NULL WILL DEFAULT TO "FROM" DUZ AND "TO" DFN
    31                S DEBUG=0
    32                S TGLOBAL=$NA(^TMP($J,"TEMPLATE")) ; GLOBAL FOR STORING TEMPLATE
    33                S CCRGLO=$NA(^TMP($J,DFN,"CCR")) ; GLOBAL FOR BUILDING THE CCR
    34                S ACTGLO=$NA(^TMP($J,DFN,"ACTORS")); GLOBAL FOR ALL ACTORS
    35                ; TO GET PART OF THE CCR RETURNED, PASS CCRPART="PROBLEMS" ETC
    36                S CCRGRTN=$NA(^TMP($J,DFN,CCRPART)) ; RTN GLO NM OF PART OR ALL
    37                D LOAD^GPLCCR0(TGLOBAL)  ; LOAD THE CCR TEMPLATE
    38                D CP^GPLXPATH(TGLOBAL,CCRGLO) ; COPY THE TEMPLATE TO CCR GLOBAL
    39                ;
    40                ; DELETE THE BODY, ACTORS AND SIGNATURES SECTIONS FROM GLOBAL
    41                ; THESE WILL BE POPULATED AFTER CALLS TO THE XPATH ROUTINES
    42                D REPLACE^GPLXPATH(CCRGLO,"","//ContinuityOfCareRecord/Body")
    43                D REPLACE^GPLXPATH(CCRGLO,"","//ContinuityOfCareRecord/Actors")
    44                D REPLACE^GPLXPATH(CCRGLO,"","//ContinuityOfCareRecord/Signatures")
    45                I DEBUG F I=1:1:@CCRGLO@(0) W @CCRGLO@(I),!
    46                ;
    47                D HDRMAP(CCRGLO,DFN,HDRARY) ; MAP HEADER VARIABLES
    48                ;
    49                K ^TMP($J,"CCRSTEP") ; KILL GLOBAL PRIOR TO ADDING TO IT
    50                S CCRXTAB="^TMP($J,""CCRSTEP"")" ; GLOBAL TO STORE CCR STEPS
    51                D INITSTPS(CCRXTAB) ; INITIALIZED CCR PROCESSING STEPS
    52                N I,XI,TAG,RTN,CALL,XPATH,IXML,OXML,INXML,CCRBLD
    53                F I=1:1:@CCRXTAB@(0)  D  ; PROCESS THE CCR BODY SECTIONS
    54                . S XI=@CCRXTAB@(I) ; CALL COPONENTS TO PARSE
    55                . S RTN=$P(XI,";",2) ; NAME OF ROUTINE TO CALL
    56                . S TAG=$P(XI,";",1) ; LABEL INSIDE ROUTINE TO CALL
    57                . S XPATH=$P(XI,";",3) ; XPATH TO XML TO PASS TO ROUTINE
    58                . D QUERY^GPLXPATH(TGLOBAL,XPATH,"INXML") ; EXTRACT XML TO PASS
    59                . S IXML="INXML"
    60                . S OXML=$P(XI,";",4) ; ARRAY FOR SECTION VALUES
    61                . ; W OXML,!
    62                . S CALL="D "_TAG_"^"_RTN_"(IXML,DFN,OXML)" ; SETUP THE CALL
    63                . W "RUNNING ",CALL,!
    64                . X CALL
    65                . ; NOW INSERT THE RESULTS IN THE CCR BUFFER
    66                . D INSERT^GPLXPATH(CCRGLO,OXML,"//ContinuityOfCareRecord/Body")
    67                . I DEBUG F GPLI=1:1:@OXML@(0) W @OXML@(GPLI),!
    68                D ACTLST^GPLCCR(CCRGLO,ACTGLO) ; GEN THE ACTOR LIST
    69                Q
    70                ;
    71 INITSTPS(TAB)     ; INITIALIZE CCR PROCESSING STEPS
    72                ; TAB IS PASSED BY NAME
    73                ; W "TAB= ",TAB,!
    74                D PUSH^GPLXPATH(TAB,"EXTRACT;GPLVITALS;//ContinuityOfCareRecord/Body/VitalSigns;^TMP($J,DFN,""VITALS"")")
    75                D PUSH^GPLXPATH(TAB,"EXTRACT;GPLPROBS;//ContinuityOfCareRecord/Body/Problems;^TMP($J,DFN,""PROBLEMS"")")
    76                Q
    77                 ;
    78 HDRMAP(CXML,DFN,IHDR)   ; MAP HEADER VARIABLES: FROM, TO ECT
    79                N VMAP S VMAP=$NA(^TMP($J,DFN,"HEADER"))
    80                ; K @VMAP
    81                I IHDR="" D  ; HEADER ARRAY IS NOT PROVIDED, USE DEFAULTS
    82                . S @VMAP@("ACTORPATIENT")="ACTORPATIENT_"_DFN
    83                . S @VMAP@("ACTORFROM")="ACTORPROVIDER_"_DUZ ; FROM DUZ - ???
    84                . S @VMAP@("ACTORFROM2")="ACTORPROVIDER_"_DUZ ; NEED BETTER WAY
    85                . S @VMAP@("ACTORTO")="ACTORPATIENT_"_DFN  ; FOR TEST PURPOSES,
    86                . ; THIS IS THE USE CASE FOR THE PHR WHERE "TO" IS THE PATIENT
    87                I IHDR'="" D  ; HEADER VALUES ARE PROVIDED
    88                . D CP^GPLXPATH(IHDR,VMAP) ; COPY HEADER VARIABLES TO MAP ARRAY
    89                N CTMP
    90                D MAP^GPLXPATH(CXML,VMAP,"CTMP")
    91                D CP^GPLXPATH("CTMP",CXML)
    92                Q
    93                ;
    94 ACTLST(AXML,ACTRTN)     ; RETURN THE ACTOR LIST FOR THE XML IN AXML
    95                ; AXML AND ACTRTN ARE PASSED BY NAME
    96                ; EACH ACTOR RECORD HAS 3 PARTS - IE IF OBJECTID=ACTORPATIENT_2
    97                ; P1= OBJECTID - ACTORPATIENT_2
    98                ; P2= OBJECT TYPE - PATIENT OR PROVIDER OR SOFTWARE
    99                ;     OR INSTITUTION
    100                ;     OR PERSON(IN PATIENT FILE IE NOK)
    101                ; P3= IEN RECORD NUMBER FOR ACTOR - 2
    102                N I,J,K,L
    103                K @ACTRTN ; CLEAR RETURN ARRAY
    104                F I=1:1:@AXML@(0) D  ; SCAN ALL LINES
    105                . I @AXML@(I)?.E1"<ActorID>".E D  ; THERE IS AN ACTOR THIS LINE
    106                . . S J=$P($P(@AXML@(I),"<ActorID>",2),"</ActorID>",1)
    107                . . W "<ActorID>=>",J,!
    108                . . I J'="" S K(J)="" ; HASHING ACTOR
    109                . . ;  TO GET RID OF DUPLICATES
    110                S I="" ; GOING TO $O THROUGH THE HASH
    111                F J=0:0 D  Q:$O(K(I))=""
    112                . S I=$O(K(I)) ; WALK THROUGH THE HASH OF ACTORS
    113                . S $P(L,U,1)=I ; FIRST PIECE IS THE OBJECT ID
    114                . S $P(L,U,2)=$P($P(I,"ACTOR",2),"_",1) ; ACTOR TYPE
    115                . S $P(L,U,3)=$P(I,"_",2) ; IEN RECORD NUMBER FOR ACTOR
    116                . D PUSH^GPLXPATH(ACTRTN,L) ; ADD THE ACTOR TO THE RETURN ARRAY
    117                Q
    118                ;
    119 TEST      ; RUN ALL THE TEST CASES
    120              D TESTALL^GPLUNIT("GPLCCR")
    121              Q
    122              ;
    123 ZTEST(WHICH)    ; RUN ONE SET OF TESTS
    124              N ZTMP
    125              D ZLOAD^GPLUNIT("ZTMP","GPLCCR")
    126              D ZTEST^GPLUNIT(.ZTMP,WHICH)
    127              Q
    128              ;
    129 TLIST   ; LIST THE TESTS
    130              N ZTMP
    131              D ZLOAD^GPLUNIT("ZTMP","GPLCCR")
    132              D TLIST^GPLUNIT(.ZTMP)
    133              Q
    134              ;
    135 ;;><TEST>
    136 ;;><PROBLEMS>
    137 ;;>>>K GPL S GPL=""
    138 ;;>>>D CCRRPC^GPLCCR(.GPL,"2","PROBLEMS","","","")
    139 ;;>>?@GPL@(@GPL@(0))["</Problems>"
    140 ;;><VITALS>
    141 ;;>>>K GPL S GPL=""
    142 ;;>>>D CCRRPC^GPLCCR(.GPL,"2","VITALS","","","")
    143 ;;>>?@GPL@(@GPL@(0))["</VitalSigns>"
    144 ;;><CCR>
    145 ;;>>>K GPL S GPL=""
    146 ;;>>>D CCRRPC^GPLCCR(.GPL,"2","CCR","","","")
    147 ;;>>?@GPL@(@GPL@(0))["</ContinuityOfCareRecord>"
    148 ;;><ACTLST>
    149 ;;>>>K GPL S GPL=""
    150 ;;>>>D CCRRPC^GPLCCR(.GPL,"2","CCR","","","")
    151 ;;>>>D ACTLST^GPLCCR(GPL,"ACTTEST")
    152 ;;></TEST>
     1GPLCCR   ; CCDCCR/GPL - CCR MAIN PROCESSING; 6/6/08
     2               ;;0.1;CCDCCR;nopatch;noreleasedate
     3               ;
     4               ; EXPORT A CCR
     5               ;
     6EXPORT   ; EXPORT ENTRY POINT FOR CCR
     7                      ; Select a patient.
     8                      S DIC=2,DIC(0)="AEMQ" D ^DIC
     9                      I Y<1 Q ; EXIT
     10                      S DFN=$P(Y,U,1) ; SET THE PATIENT
     11                      N CCRGLO
     12                      D CCRRPC(.CCRGLO,DFN,"CCR","","","")
     13                      S OARY=$NA(^TMP($J,DFN,"CCR",1))
     14                      S ONAM="PAT_"_DFN_"_CCR_V1.xml"
     15                      S ODIR="/home/glilly/CCROUT"
     16                      ;S ODIR="/home/cedwards/"
     17                      D OUTPUT^GPLXPATH(OARY,ONAM,ODIR)
     18                      Q
     19                      ;
     20CCRRPC(CCRGRTN,DFN,CCRPART,TIME1,TIME2,HDRARY)  ;RPC ENTRY POINT FOR CCR OUTPUT
     21                      ; CCRGRTN IS RETURN ARRAY PASSED BY NAME
     22                      ; DFN IS PATIENT IEN
     23                      ; CCRPART IS "CCR" FOR ENTIRE CCR, OR SECTION NAME FOR A PART
     24                      ;   OF THE CCR BODY.. PARTS INCLUDE "PROBLEMS" "VITALS" ETC
     25                      ; TIME1 IS STARTING TIME TO INCLUDE - NULL MEANS ALL
     26                      ; TIME2 IS ENDING TIME TO INCLUDE TIME IS FILEMAN TIME
     27                      ; - NULL MEANS NOW
     28                      ; HDRARY IS THE HEADER ARRAY DEFINING THE "FROM" AND
     29                      ;    "TO" VARIABLES
     30                      ;    IF NULL WILL DEFAULT TO "FROM" DUZ AND "TO" DFN
     31                      S DEBUG=0
     32                      S TGLOBAL=$NA(^TMP($J,"TEMPLATE")) ; GLOBAL FOR STORING TEMPLATE
     33                      S CCRGLO=$NA(^TMP($J,DFN,"CCR")) ; GLOBAL FOR BUILDING THE CCR
     34                      S ACTGLO=$NA(^TMP($J,DFN,"ACTORS")); GLOBAL FOR ALL ACTORS
     35                      ; TO GET PART OF THE CCR RETURNED, PASS CCRPART="PROBLEMS" ETC
     36                      S CCRGRTN=$NA(^TMP($J,DFN,CCRPART)) ; RTN GLO NM OF PART OR ALL
     37                      D LOAD^GPLCCR0(TGLOBAL)  ; LOAD THE CCR TEMPLATE
     38                      D CP^GPLXPATH(TGLOBAL,CCRGLO) ; COPY THE TEMPLATE TO CCR GLOBAL
     39                      ;
     40                      ; DELETE THE BODY, ACTORS AND SIGNATURES SECTIONS FROM GLOBAL
     41                      ; THESE WILL BE POPULATED AFTER CALLS TO THE XPATH ROUTINES
     42                      D REPLACE^GPLXPATH(CCRGLO,"","//ContinuityOfCareRecord/Body")
     43                      D REPLACE^GPLXPATH(CCRGLO,"","//ContinuityOfCareRecord/Actors")
     44                      D REPLACE^GPLXPATH(CCRGLO,"","//ContinuityOfCareRecord/Signatures")
     45                      I DEBUG F I=1:1:@CCRGLO@(0) W @CCRGLO@(I),!
     46                      ;
     47                      D HDRMAP(CCRGLO,DFN,HDRARY) ; MAP HEADER VARIABLES
     48                      ;
     49                      K ^TMP($J,"CCRSTEP") ; KILL GLOBAL PRIOR TO ADDING TO IT
     50                      S CCRXTAB="^TMP($J,""CCRSTEP"")" ; GLOBAL TO STORE CCR STEPS
     51                      D INITSTPS(CCRXTAB) ; INITIALIZED CCR PROCESSING STEPS
     52                      N I,XI,TAG,RTN,CALL,XPATH,IXML,OXML,INXML,CCRBLD
     53                      F I=1:1:@CCRXTAB@(0)  D  ; PROCESS THE CCR BODY SECTIONS
     54                      . S XI=@CCRXTAB@(I) ; CALL COPONENTS TO PARSE
     55                      . S RTN=$P(XI,";",2) ; NAME OF ROUTINE TO CALL
     56                      . S TAG=$P(XI,";",1) ; LABEL INSIDE ROUTINE TO CALL
     57                      . S XPATH=$P(XI,";",3) ; XPATH TO XML TO PASS TO ROUTINE
     58                      . D QUERY^GPLXPATH(TGLOBAL,XPATH,"INXML") ; EXTRACT XML TO PASS
     59                      . S IXML="INXML"
     60                      . S OXML=$P(XI,";",4) ; ARRAY FOR SECTION VALUES
     61                      . ; W OXML,!
     62                      . S CALL="D "_TAG_"^"_RTN_"(IXML,DFN,OXML)" ; SETUP THE CALL
     63                      . W "RUNNING ",CALL,!
     64                      . X CALL
     65                      . ; NOW INSERT THE RESULTS IN THE CCR BUFFER
     66                      . D INSERT^GPLXPATH(CCRGLO,OXML,"//ContinuityOfCareRecord/Body")
     67                      . I DEBUG F GPLI=1:1:@OXML@(0) W @OXML@(GPLI),!
     68                      D ACTLST^GPLCCR(CCRGLO,ACTGLO) ; GEN THE ACTOR LIST
     69                      Q
     70                      ;
     71INITSTPS(TAB)       ; INITIALIZE CCR PROCESSING STEPS
     72                      ; TAB IS PASSED BY NAME
     73                      ; W "TAB= ",TAB,!
     74                      D PUSH^GPLXPATH(TAB,"EXTRACT;GPLPROBS;//ContinuityOfCareRecord/Body/Problems;^TMP($J,DFN,""PROBLEMS"")")
     75                      D PUSH^GPLXPATH(TAB,"EXTRACT;GPLVITALS;//ContinuityOfCareRecord/Body/VitalSigns;^TMP($J,DFN,""VITALS"")")
     76                      Q
     77                       ;
     78HDRMAP(CXML,DFN,IHDR)   ; MAP HEADER VARIABLES: FROM, TO ECT
     79                      N VMAP S VMAP=$NA(^TMP($J,DFN,"HEADER"))
     80                      ; K @VMAP
     81                      S @VMAP@("DATETIME")=$$FMDTOUTC^CCRUTIL($$FMTHL7^XLFDT($$NOW^XLFDT),"DT")
     82                      I IHDR="" D  ; HEADER ARRAY IS NOT PROVIDED, USE DEFAULTS
     83                      . S @VMAP@("ACTORPATIENT")="ACTORPATIENT_"_DFN
     84                      . S @VMAP@("ACTORFROM")="ACTORPROVIDER_"_DUZ ; FROM DUZ - ???
     85                      . S @VMAP@("ACTORFROM2")="ACTORPROVIDER_"_DUZ ; NEED BETTER WAY
     86                      . S @VMAP@("ACTORTO")="ACTORPATIENT_"_DFN  ; FOR TEST PURPOSES,
     87                      . ; THIS IS THE USE CASE FOR THE PHR WHERE "TO" IS THE PATIENT
     88                      I IHDR'="" D  ; HEADER VALUES ARE PROVIDED
     89                      . D CP^GPLXPATH(IHDR,VMAP) ; COPY HEADER VARIABLES TO MAP ARRAY
     90                      N CTMP
     91                      D MAP^GPLXPATH(CXML,VMAP,"CTMP")
     92                      D CP^GPLXPATH("CTMP",CXML)
     93                      Q
     94                      ;
     95ACTLST(AXML,ACTRTN)         ; RETURN THE ACTOR LIST FOR THE XML IN AXML
     96                      ; AXML AND ACTRTN ARE PASSED BY NAME
     97                      ; EACH ACTOR RECORD HAS 3 PARTS - IE IF OBJECTID=ACTORPATIENT_2
     98                      ; P1= OBJECTID - ACTORPATIENT_2
     99                      ; P2= OBJECT TYPE - PATIENT OR PROVIDER OR SOFTWARE
     100                      ;     OR INSTITUTION
     101                      ;     OR PERSON(IN PATIENT FILE IE NOK)
     102                      ; P3= IEN RECORD NUMBER FOR ACTOR - 2
     103                      N I,J,K,L
     104                      K @ACTRTN ; CLEAR RETURN ARRAY
     105                      F I=1:1:@AXML@(0) D  ; SCAN ALL LINES
     106                      . I @AXML@(I)?.E1"<ActorID>".E D  ; THERE IS AN ACTOR THIS LINE
     107                      . . S J=$P($P(@AXML@(I),"<ActorID>",2),"</ActorID>",1)
     108                      . . W "<ActorID>=>",J,!
     109                      . . I J'="" S K(J)="" ; HASHING ACTOR
     110                      . . ;  TO GET RID OF DUPLICATES
     111                      S I="" ; GOING TO $O THROUGH THE HASH
     112                      F J=0:0 D  Q:$O(K(I))=""
     113                      . S I=$O(K(I)) ; WALK THROUGH THE HASH OF ACTORS
     114                      . S $P(L,U,1)=I ; FIRST PIECE IS THE OBJECT ID
     115                      . S $P(L,U,2)=$P($P(I,"ACTOR",2),"_",1) ; ACTOR TYPE
     116                      . S $P(L,U,3)=$P(I,"_",2) ; IEN RECORD NUMBER FOR ACTOR
     117                      . D PUSH^GPLXPATH(ACTRTN,L) ; ADD THE ACTOR TO THE RETURN ARRAY
     118                      Q
     119                      ;
     120TEST         ; RUN ALL THE TEST CASES
     121                    D TESTALL^GPLUNIT("GPLCCR")
     122                    Q
     123                    ;
     124ZTEST(WHICH)       ; RUN ONE SET OF TESTS
     125                    N ZTMP
     126                    D ZLOAD^GPLUNIT("ZTMP","GPLCCR")
     127                    D ZTEST^GPLUNIT(.ZTMP,WHICH)
     128                    Q
     129                    ;
     130TLIST     ; LIST THE TESTS
     131                    N ZTMP
     132                    D ZLOAD^GPLUNIT("ZTMP","GPLCCR")
     133                    D TLIST^GPLUNIT(.ZTMP)
     134                    Q
     135                    ;
     136;;><TEST>       
     137;;><PROBLEMS>   
     138;;>>>K  GPL S GPL=""
     139;;>>>D  CCRRPC^GPLCCR(.GPL,"2","PROBLEMS","","","")
     140;;>>?@GPL@(@GPL@(0))["</Problems>"     
     141;;><VITALS>     
     142;;>>>K  GPL S GPL=""
     143;;>>>D  CCRRPC^GPLCCR(.GPL,"2","VITALS","","","")
     144;;>>?@GPL@(@GPL@(0))["</VitalSigns>"   
     145;;><CCR>       
     146;;>>>K  GPL S GPL=""
     147;;>>>D  CCRRPC^GPLCCR(.GPL,"2","CCR","","","")
     148;;>>?@GPL@(@GPL@(0))["</ContinuityOfCareRecord>"       
     149;;><ACTLST>     
     150;;>>>K  GPL S GPL=""
     151;;>>>D  CCRRPC^GPLCCR(.GPL,"2","CCR","","","")
     152;;>>>D  ACTLST^GPLCCR(GPL,"ACTTEST")
     153;;></TEST>     
  • ccr/trunk/p/GPLCCR0.m

    r34 r36  
    4545               Q
    4646               ;
    47 ;<TEMPLATE>     
     47;<TEMPLATE>
    4848;;<?xml version="1.0" encoding="UTF-8"?>
    49 ;;<?xml-stylesheet      type="text/xsl" href="ccr_20060420.xsl"?>
    50 ;;<ContinuityOfCareRecord       xmlns="urn:astm-org:CCR">
    51 ;;<CCRDocumentObjectID>871bd605-e8f8-4b80-9918-4b03f781129e</CCRDocumentObjectID>       
    52 ;;<Language>   
    53 ;;<Text>English</Text> 
    54 ;;</Language>   
    55 ;;<Version>V1.0</Version>       
    56 ;;<DateTime>   
    57 ;;<ExactDateTime>@@DATETIME@@2008-03-18T23:10:58Z</ExactDateTime>       
    58 ;;</DateTime>   
    59 ;;<Patient>     
    60 ;;<ActorID>@@ACTORPATIENT@@</ActorID>   
    61 ;;</Patient>   
    62 ;;<From>       
    63 ;;<ActorLink>   
    64 ;;<ActorID>@@ACTORFROM@@</ActorID>     
    65 ;;</ActorLink> 
    66 ;;<ActorLink>   
    67 ;;<ActorID>@@ACTORFROM2@@</ActorID>     
    68 ;;</ActorLink> 
    69 ;;</From>       
    70 ;;<To> 
    71 ;;<ActorLink>   
    72 ;;<ActorID>@@ACTORTO@@</ActorID>       
    73 ;;<ActorRole>   
    74 ;;<Text>Primary Provider</Text>
    75 ;;</ActorRole> 
    76 ;;</ActorLink> 
    77 ;;</To>
    78 ;;<Purpose>     
    79 ;;<Description>
    80 ;;<Text>@@PURPOSEDESCRIPTION@@CEND      PHR</Text>
    81 ;;</Description>       
    82 ;;</Purpose>   
    83 ;;<Body>       
    84 ;;<Problems>   
    85 ;;<Problem>     
    86 ;;<CCRDataObjectID>@@PROBLEMOBJECTID@@</CCRDataObjectID>       
    87 ;;<Type>       
    88 ;;<Text>Problem</Text> 
    89 ;;</Type>       
    90 ;;<Description>
    91 ;;<Text>@@PROBLEMDESCRIPTION@@</Text>   
    92 ;;<Code>       
    93 ;;<Value>@@PROBLEMCODEVALUE@@</Value>   
    94 ;;<CodingSystem>ICD9CM</CodingSystem>   
    95 ;;<Version>@@PROBLEMCODINGVERSION@@</Version>   
    96 ;;</Code>       
    97 ;;</Description>       
    98 ;;<Source>     
    99 ;;<Actor>       
    100 ;;<ActorID>@@PROBLEMSOURCEACTORID@@</ActorID>   
    101 ;;</Actor>     
    102 ;;</Source>     
    103 ;;</Problem>   
    104 ;;</Problems>   
    105 ;;<FamilyHistory>       
    106 ;;<FamilyProblemHistory>       
    107 ;;<CCRDataObjectID></CCRDataObjectID>   
    108 ;;<Source>     
    109 ;;<Actor>       
    110 ;;<ActorID>AA0001</ActorID>     
    111 ;;</Actor>     
    112 ;;</Source>     
    113 ;;<FamilyMember>       
    114 ;;<ActorID>AA0003</ActorID>     
    115 ;;<ActorRole>   
    116 ;;<Text>Father</Text>   
    117 ;;</ActorRole> 
    118 ;;<Source>     
    119 ;;<Actor>       
    120 ;;<ActorID>AA0001</ActorID>     
    121 ;;</Actor>     
    122 ;;</Source>     
    123 ;;</FamilyMember>       
    124 ;;<Problem>     
    125 ;;<Type>       
    126 ;;<Text>Problem</Text> 
    127 ;;</Type>       
    128 ;;<Description>
    129 ;;<Text>Heart   Disease</Text>
    130 ;;<Code>       
    131 ;;<Value>C0018799</Value>       
    132 ;;<CodingSystem>UMLS    Concept</CodingSystem>
    133 ;;<Version>2006</Version>       
    134 ;;</Code>       
    135 ;;<Code>       
    136 ;;<Value>429.9</Value> 
    137 ;;<CodingSystem>ICD9CM</CodingSystem>   
    138 ;;<Version>2006</Version>       
    139 ;;</Code>       
    140 ;;<Code>       
    141 ;;<Value>56265001</Value>       
    142 ;;<CodingSystem>SNOMEDCT</CodingSystem>
    143 ;;<Version>2006</Version>       
    144 ;;</Code>       
    145 ;;</Description>       
    146 ;;<Source>     
    147 ;;<Actor>       
    148 ;;<ActorID>AA0001</ActorID>     
    149 ;;</Actor>     
    150 ;;</Source>     
    151 ;;</Problem>   
    152 ;;</FamilyProblemHistory>       
    153 ;;<FamilyProblemHistory>       
    154 ;;<CCRDataObjectID>BB0003</CCRDataObjectID>     
    155 ;;<Source>     
    156 ;;<Actor>       
    157 ;;<ActorID>AA0001</ActorID>     
    158 ;;</Actor>     
    159 ;;</Source>     
    160 ;;<FamilyMember>       
    161 ;;<ActorID>AA0004</ActorID>     
    162 ;;<ActorRole>   
    163 ;;<Text>Grandparents</Text>     
    164 ;;</ActorRole> 
    165 ;;<Source>     
    166 ;;<Actor>       
    167 ;;<ActorID>AA0001</ActorID>     
    168 ;;</Actor>     
    169 ;;</Source>     
    170 ;;</FamilyMember>       
    171 ;;<Problem>     
    172 ;;<Type>       
    173 ;;<Text>Problem</Text> 
    174 ;;</Type>       
    175 ;;<Description>
    176 ;;<Text>Arthritis</Text>       
    177 ;;<Code>       
    178 ;;<Value>C0003873</Value>       
    179 ;;<CodingSystem>UMLS    Concept</CodingSystem>
    180 ;;<Version>2006</Version>       
    181 ;;</Code>       
    182 ;;<Code>       
    183 ;;<Value>714.0</Value> 
    184 ;;<CodingSystem>ICD9CM</CodingSystem>   
    185 ;;<Version>2006</Version>       
    186 ;;</Code>       
    187 ;;<Code>       
    188 ;;<Value>69896004</Value>       
    189 ;;<CodingSystem>SNOMEDCT</CodingSystem>
    190 ;;<Version>2006</Version>       
    191 ;;</Code>       
    192 ;;</Description>       
    193 ;;<Source>     
    194 ;;<Actor>       
    195 ;;<ActorID>AA0001</ActorID>     
    196 ;;</Actor>     
    197 ;;</Source>     
    198 ;;</Problem>   
    199 ;;<Problem>     
    200 ;;<Type>       
    201 ;;<Text>Problem</Text> 
    202 ;;</Type>       
    203 ;;<Description>
    204 ;;<Text>Diabetes        Mellitus</Text>
    205 ;;<Code>       
    206 ;;<Value>C0375113</Value>       
    207 ;;<CodingSystem>UMLS    Concept</CodingSystem>
    208 ;;<Version>2006</Version>       
    209 ;;</Code>       
    210 ;;<Code>       
    211 ;;<Value>250.00</Value>
    212 ;;<CodingSystem>ICD9CM</CodingSystem>   
    213 ;;<Version>2006</Version>       
    214 ;;</Code>       
    215 ;;</Description>       
    216 ;;<Source>     
    217 ;;<Actor>       
    218 ;;<ActorID>AA0001</ActorID>     
    219 ;;</Actor>     
    220 ;;</Source>     
    221 ;;</Problem>   
    222 ;;<Problem>     
    223 ;;<Type>       
    224 ;;<Text>Problem</Text> 
    225 ;;</Type>       
    226 ;;<Description>
    227 ;;<Text>Parkinson's     disease NOS</Text>
    228 ;;<Code>       
    229 ;;<Value>332.0</Value> 
    230 ;;<CodingSystem>ICD9CM</CodingSystem>   
    231 ;;<Version>2007</Version>       
    232 ;;</Code>       
    233 ;;</Description>       
    234 ;;<Source>     
    235 ;;<Actor>       
    236 ;;<ActorID>AA0001</ActorID>     
    237 ;;</Actor>     
    238 ;;</Source>     
    239 ;;</Problem>   
    240 ;;</FamilyProblemHistory>       
    241 ;;</FamilyHistory>     
    242 ;;<SocialHistory>       
    243 ;;<SocialHistoryElement>       
    244 ;;<CCRDataObjectID>BB0004</CCRDataObjectID>     
    245 ;;<Type>       
    246 ;;<Text>Marital Status</Text>
    247 ;;</Type>       
    248 ;;<Description>
    249 ;;<Text>Married</Text> 
    250 ;;</Description>       
    251 ;;<Source>     
    252 ;;<Actor>       
    253 ;;<ActorID>AA0001</ActorID>     
    254 ;;</Actor>     
    255 ;;</Source>     
    256 ;;</SocialHistoryElement>       
    257 ;;<SocialHistoryElement>       
    258 ;;<CCRDataObjectID>BB0005</CCRDataObjectID>     
    259 ;;<Type>       
    260 ;;<Text>Ethnic  Origin</Text>
    261 ;;</Type>       
    262 ;;<Description>
    263 ;;<Text>Not     Hispanic or Latino</Text>
    264 ;;</Description>       
    265 ;;<Source>     
    266 ;;<Actor>       
    267 ;;<ActorID>AA0001</ActorID>     
    268 ;;</Actor>     
    269 ;;</Source>     
    270 ;;</SocialHistoryElement>       
    271 ;;<SocialHistoryElement>       
    272 ;;<CCRDataObjectID>BB0006</CCRDataObjectID>     
    273 ;;<Type>       
    274 ;;<Text>Race</Text>     
    275 ;;</Type>       
    276 ;;<Description>
    277 ;;<Text>White</Text>   
    278 ;;</Description>       
    279 ;;<Source>     
    280 ;;<Actor>       
    281 ;;<ActorID>AA0001</ActorID>     
    282 ;;</Actor>     
    283 ;;</Source>     
    284 ;;</SocialHistoryElement>       
    285 ;;<SocialHistoryElement>       
    286 ;;<CCRDataObjectID>BB0007</CCRDataObjectID>     
    287 ;;<Type>       
    288 ;;<Text>Occupation</Text>       
    289 ;;</Type>       
    290 ;;<Description>
    291 ;;<Text>Physician</Text>       
    292 ;;</Description>       
    293 ;;<Source>     
    294 ;;<Actor>       
    295 ;;<ActorID>AA0001</ActorID>     
    296 ;;</Actor>     
    297 ;;</Source>     
    298 ;;</SocialHistoryElement>       
    299 ;;</SocialHistory>     
    300 ;;<Medications>
    301 ;;<Medication> 
    302 ;;<CCRDataObjectID>BB0008</CCRDataObjectID>     
    303 ;;<DateTime>   
    304 ;;<Type>       
    305 ;;<Text>Begin   Date</Text>
    306 ;;</Type>       
    307 ;;<Age>
    308 ;;<Value>42</Value>     
    309 ;;<Units>       
    310 ;;<Unit>Years</Unit>   
    311 ;;</Units>     
    312 ;;</Age>       
    313 ;;</DateTime>   
    314 ;;<Type>       
    315 ;;<Text>Medication</Text>       
    316 ;;</Type>       
    317 ;;<Status>     
    318 ;;<Text>Active</Text>   
    319 ;;</Status>     
    320 ;;<Source>     
    321 ;;<Actor>       
    322 ;;<ActorID>AA0001</ActorID>     
    323 ;;</Actor>     
    324 ;;</Source>     
    325 ;;<Product>     
    326 ;;<ProductName>
    327 ;;<Text>simvastatin</Text>     
    328 ;;<Code>       
    329 ;;<Value>36567</Value> 
    330 ;;<CodingSystem>RXNORM</CodingSystem>   
    331 ;;<Version>2005</Version>       
    332 ;;</Code>       
    333 ;;</ProductName>       
    334 ;;<BrandName>   
    335 ;;<Text>Simvastatin</Text>     
    336 ;;<Code>       
    337 ;;<Value>00093715510</Value>   
    338 ;;<CodingSystem>NDC</CodingSystem>     
    339 ;;<Version>2005</Version>       
    340 ;;</Code>       
    341 ;;</BrandName> 
    342 ;;<Strength>   
    343 ;;<Value>40</Value>     
    344 ;;<Units>       
    345 ;;<Unit>mg</Unit>       
    346 ;;</Units>     
    347 ;;</Strength>   
    348 ;;<Form>       
    349 ;;<Text>tablet</Text>   
    350 ;;</Form>       
    351 ;;</Product>   
    352 ;;<Directions> 
    353 ;;<Direction>   
    354 ;;<Description>
    355 ;;<Text>1        PO 1 time per day</Text>
    356 ;;</Description>       
    357 ;;<Dose>       
    358 ;;<Value>1</Value>     
    359 ;;</Dose>       
    360 ;;<Route>       
    361 ;;<Text>PO</Text>       
    362 ;;</Route>     
    363 ;;<Frequency>   
    364 ;;<Value>1      time per day</Value>
    365 ;;</Frequency> 
    366 ;;</Direction> 
    367 ;;</Directions>
    368 ;;</Medication>
    369 ;;</Medications>       
    370 ;;<VitalSigns> 
    371 ;;<Result>     
    372 ;;<CCRDataObjectID>@@DATAOBJECTID@@</CCRDataObjectID>   
    373 ;;<DateTime>   
    374 ;;<Type>       
    375 ;;<Text>Assessment      Time</Text>
    376 ;;</Type>       
    377 ;;<ExactDateTime>@@HEIGHTWEIGHTDATATIME@@</ExactDateTime>       
    378 ;;</DateTime>   
    379 ;;<Description>
    380 ;;<Text>Height  &amp; Weight</Text>
    381 ;;</Description>       
    382 ;;<Source>     
    383 ;;<Actor>       
    384 ;;<ActorID>@@HEIGHTWEIGHTSOURCE@@</ActorID>     
    385 ;;</Actor>     
    386 ;;</Source>     
    387 ;;<Test>       
    388 ;;<CCRDataObjectID>@@DATAOBJECTID@@</CCRDataObjectID>   
    389 ;;<Type>       
    390 ;;<Text>Observation</Text>     
    391 ;;</Type>       
    392 ;;<Description>
    393 ;;<Text>Height</Text>   
    394 ;;<Code>       
    395 ;;<Value>50373000</Value>       
    396 ;;<CodingSystem>SNOMED</CodingSystem>   
    397 ;;<Version>2006</Version>       
    398 ;;</Code>       
    399 ;;</Description>       
    400 ;;<Source>     
    401 ;;<Actor>       
    402 ;;<ActorID>@@HEIGHTSOURCEID@@</ActorID>
    403 ;;</Actor>     
    404 ;;</Source>     
    405 ;;<TestResult> 
    406 ;;<Value>@@HEIGHTINCHES@@</Value>       
    407 ;;<Units>       
    408 ;;<Unit>in</Unit>       
    409 ;;</Units>     
    410 ;;</TestResult>
    411 ;;</Test>       
    412 ;;<Test>       
    413 ;;<CCRDataObjectID>@@DATAOBJECTID@@</CCRDataObjectID>   
    414 ;;<Type>       
    415 ;;<Text>Observation</Text>     
    416 ;;</Type>       
    417 ;;<Description>
    418 ;;<Text>Weight</Text>   
    419 ;;<Code>       
    420 ;;<Value>363808001</Value>     
    421 ;;<CodingSystem>SNOMED</CodingSystem>   
    422 ;;<Version>2006</Version>       
    423 ;;</Code>       
    424 ;;</Description>       
    425 ;;<Source>     
    426 ;;<Actor>       
    427 ;;<ActorID>@@WEIGHTSOURCEID@@</ActorID>
    428 ;;</Actor>     
    429 ;;</Source>     
    430 ;;<TestResult> 
    431 ;;<Value>@@WEIGHTLBS@@</Value> 
    432 ;;<Units>       
    433 ;;<Unit>lb</Unit>       
    434 ;;</Units>     
    435 ;;</TestResult>
    436 ;;</Test>       
    437 ;;</Result>     
    438 ;;<Result>     
    439 ;;<CCRDataObjectID>@@DATAOBJECTID@@</CCRDataObjectID>   
    440 ;;<Description>
    441 ;;<Text>Blood   Type</Text>
    442 ;;</Description>       
    443 ;;<Source>     
    444 ;;<Actor>       
    445 ;;<ActorID>@@BLOODTYPESOURCEID@@</ActorID>     
    446 ;;</Actor>     
    447 ;;</Source>     
    448 ;;<Test>       
    449 ;;<CCRDataObjectID>@@DATAOBJECTID@@</CCRDataObjectID>   
    450 ;;<Type>       
    451 ;;<Text>Result</Text>   
    452 ;;</Type>       
    453 ;;<Description>
    454 ;;<Text>Blood   Type</Text>
    455 ;;<Code>       
    456 ;;<Value>278149003</Value>     
    457 ;;<CodingSystem>SNOMED</CodingSystem>   
    458 ;;<Version>2005</Version>       
    459 ;;</Code>       
    460 ;;</Description>       
    461 ;;<Source>     
    462 ;;<Actor>       
    463 ;;<ActorID>@@BLOODTYPESOURCEID2@@</ActorID>     
    464 ;;</Actor>     
    465 ;;</Source>     
    466 ;;<TestResult> 
    467 ;;<Value>@@BLOODTYPERESULT@@</Value>   
    468 ;;</TestResult>
    469 ;;</Test>       
    470 ;;</Result>     
    471 ;;</VitalSigns>
    472 ;;<HealthCareProviders>
    473 ;;<Provider>   
    474 ;;<ActorID>AA0005</ActorID>     
    475 ;;<ActorRole>   
    476 ;;<Text>Primary Provider</Text>
    477 ;;</ActorRole> 
    478 ;;</Provider>   
    479 ;;</HealthCareProviders>       
    480 ;;</Body>       
    481 ;;<Actors>     
    482 ;;<Actor>       
    483 ;;<ActorObjectID>@@ACTOROBJECTID@@</ActorObjectID>     
    484 ;;<Person>     
    485 ;;<Name>       
    486 ;;<CurrentName>
    487 ;;<Given>@@ACTORGIVENNAME@@</Given>     
    488 ;;<Middle>@@ACTORMIDDLENAME@@</Middle> 
    489 ;;<Family>@@ACTORFAMILYNAME@@</Family> 
    490 ;;</CurrentName>       
    491 ;;</Name>       
    492 ;;<DateOfBirth>
    493 ;;<ExactDateTime>@@ACTORDATEOFBIRTH@@</ExactDateTime>   
    494 ;;</DateOfBirth>       
    495 ;;<Gender>     
    496 ;;<Text>@@ACTORGENDER@@</Text> 
    497 ;;</Gender>     
    498 ;;</Person>     
    499 ;;<IDs>
    500 ;;<Type>       
    501 ;;<Text>SSN</Text>     
    502 ;;</Type>       
    503 ;;<ID>@@ACTORSSN@@</ID>
    504 ;;<Source>     
    505 ;;<Actor>       
    506 ;;<ActorID>@@ACTORSSNSOURCEID@@</ActorID>       
    507 ;;</Actor>     
    508 ;;</Source>     
    509 ;;</IDs>       
    510 ;;<Address>     
    511 ;;<Type>       
    512 ;;<Text>@@ACTORADDRESSTYPE@@</Text>     
    513 ;;</Type>       
    514 ;;<Line1>@@ACTORADDRESSLINE1@@</Line1> 
    515 ;;<Line2>@@ACTORADDRESSLINE2@@</Line2> 
    516 ;;<City>@@ACTORADDRESSCITY@@</City>     
    517 ;;<State>@@ACTORADDRESSSTATE@@</State> 
    518 ;;<PostalCode>@@ACTORADDRESSZIPCODE@@</PostalCode>     
    519 ;;</Address>   
    520 ;;<Telephone>   
    521 ;;<Value>@@ACTORTELEPHONE@@</Value>     
    522 ;;<Type>       
    523 ;;<Text>@@ACTORTELEPHONETYPE@@</Text>   
    524 ;;</Type>       
    525 ;;</Telephone> 
    526 ;;<EMail>       
    527 ;;<Value>@@ACTOREMAIL@@</Value>
    528 ;;</EMail>     
    529 ;;<Source>     
    530 ;;<Actor>       
    531 ;;<ActorID>@@ACTORADDRESSSOURCEID@@</ActorID>   
    532 ;;</Actor>     
    533 ;;</Source>     
    534 ;;</Actor>     
    535 ;;<Actor>       
    536 ;;<ActorObjectID>@@ACTOROBJECTID@@</ActorObjectID>     
    537 ;;<InformationSystem>   
    538 ;;<Name>@@ACTORINFOSYSNAME@@</Name>     
    539 ;;<Version>@@ACTORINFOSYSVER@@</Version>       
    540 ;;</InformationSystem> 
    541 ;;<Source>     
    542 ;;<Actor>       
    543 ;;<ActorID>@@ACTORINFOSYSSOURCEID@@</ActorID>   
    544 ;;</Actor>     
    545 ;;</Source>     
    546 ;;</Actor>     
    547 ;;<Actor>       
    548 ;;<ActorObjectID>AA0003</ActorObjectID>
    549 ;;<Person>     
    550 ;;<Name>       
    551 ;;<DisplayName>@@ACTORDISPLAYNAME@@</DisplayName>       
    552 ;;</Name>       
    553 ;;</Person>     
    554 ;;<Relation>   
    555 ;;<Text>@@ACTORRELATION@@</Text>       
    556 ;;</Relation>   
    557 ;;<Source>     
    558 ;;<Actor>       
    559 ;;<ActorID>@@ACTORRELATIONSOURCEID@@</ActorID> 
    560 ;;</Actor>     
    561 ;;</Source>     
    562 ;;</Actor>     
    563 ;;<Actor>       
    564 ;;<ActorObjectID>@@ACTOROBJECTID@@</ActorObjectID>     
    565 ;;<Person>     
    566 ;;<Name>       
    567 ;;<CurrentName>
    568 ;;<Given>@@ACTORGIVENNAME@@</Given>     
    569 ;;<Family>@@ACTORFAMILYNAME@@</Family> 
    570 ;;</CurrentName>       
    571 ;;</Name>       
    572 ;;</Person>     
    573 ;;<Specialty>   
    574 ;;<Text>@@ACTORSPECIALITY@@</Text>     
    575 ;;</Specialty> 
    576 ;;<Address>     
    577 ;;<Type>       
    578 ;;<Text>@@ACTORADDRESSTYPE@@</Text>     
    579 ;;</Type>       
    580 ;;<Line1>@@ACTORADDRESSLINE1@@</Line1> 
    581 ;;<City>@@ACTORADDRESSLINE2@@</City>   
    582 ;;<State>@@ACTORADDRESSSTATE@@</State> 
    583 ;;</Address>   
    584 ;;<Source>     
    585 ;;<Actor>       
    586 ;;<ActorID>@@ACTORSOURCEID@@</ActorID> 
    587 ;;</Actor>     
    588 ;;</Source>     
    589 ;;</Actor>     
    590 ;;</Actors>     
    591 ;;<Signatures> 
    592 ;;<CCRSignature>       
    593 ;;<SignatureObjectID>S0001</SignatureObjectID> 
    594 ;;<ExactDateTime>2008-03-18T23:10:58Z</ExactDateTime>   
    595 ;;<Source>     
    596 ;;<ActorID>AA0001</ActorID>     
    597 ;;</Source>     
    598 ;;<Signature>   
    599 ;;<Signature    xmlns="http://www.w3.org/2000/09/xmldsig#">
    600 ;;<SignedInfo> 
    601 ;;<CanonicalizationMethod       Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
    602 ;;<SignatureMethod      Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
    603 ;;<Reference    URI="">
    604 ;;<Transforms> 
    605 ;;<Transform    Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
    606 ;;</Transforms>
    607 ;;<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
    608 ;;<DigestValue>YFveLLyo+75P7rSciv0/m1O6Ot4=</DigestValue>       
    609 ;;</Reference> 
    610 ;;</SignedInfo>
    611 ;;<SignatureValue>Bj6sACXl74hrlbUYnu8HqnRab5VGy69BOYjOH7dETxgppXMEd7AoVYaePZvgJft78JR4oQY76hbFyGcIslYauPpJxx2hCd5d56xFeaQg01R6AQOvGnhjlq63TbpFdUq0B4tYsmiibJPbQJhTQe+TcWTBvWaQt8Fkk5blO571YvI=</SignatureValue>
    612 ;;<KeyInfo>     
    613 ;;<KeyValue>   
    614 ;;<RSAKeyValue>
    615 ;;<Modulus>meH817QYol+/uUEg6j8Mg89s7GTlaN9B+/CGlzrtnQH+swMigZRnEPxHVO8PhEymP/W9nlhAjTScV/CUzA9yJ9WiaOn17c+KReKhfBqL24DX9BpbJ+kLYVz7mBO5Qydk5AzUT2hFwW93irD8iRKP+/t+2Mi2CjNfj8VTjJpHpm0=</Modulus>       
    616 ;;<Exponent>AQAB</Exponent>     
    617 ;;</RSAKeyValue>       
    618 ;;</KeyValue>   
    619 ;;</KeyInfo>   
    620 ;;</Signature> 
    621 ;;</Signature> 
    622 ;;</CCRSignature>       
    623 ;;</Signatures>
    624 ;;</ContinuityOfCareRecord>     
    625 ;</TEMPLATE>   
     49;;<?xml-stylesheet type="text/xsl" href="ccr_20060420.xsl"?>
     50;;<ContinuityOfCareRecord xmlns="urn:astm-org:CCR">
     51;;<CCRDocumentObjectID>871bd605-e8f8-4b80-9918-4b03f781129e</CCRDocumentObjectID>
     52;;<Language>
     53;;<Text>English</Text>
     54;;</Language>
     55;;<Version>V1.0</Version>
     56;;<DateTime>
     57;;<ExactDateTime>@@DATETIME@@</ExactDateTime>
     58;;</DateTime>
     59;;<Patient>
     60;;<ActorID>@@ACTORPATIENT@@</ActorID>
     61;;</Patient>
     62;;<From>
     63;;<ActorLink>
     64;;<ActorID>@@ACTORFROM@@</ActorID>
     65;;</ActorLink>
     66;;<ActorLink>
     67;;<ActorID>@@ACTORFROM2@@</ActorID>
     68;;</ActorLink>
     69;;</From>
     70;;<To>
     71;;<ActorLink>
     72;;<ActorID>@@ACTORTO@@</ActorID>
     73;;<ActorRole>
     74;;<Text>@@ACTORTOTEXT@@</Text>
     75;;</ActorRole>
     76;;</ActorLink>
     77;;</To>
     78;;<Purpose>
     79;;<Description>
     80;;<Text>@@PURPOSEDESCRIPTION@@</Text>
     81;;</Description>
     82;;</Purpose>
     83;;<Body>
     84;;<Problems>
     85;;<Problem>
     86;;<CCRDataObjectID>@@PROBLEMOBJECTID@@</CCRDataObjectID>
     87;;<Type>
     88;;<Text>Problem</Text>
     89;;</Type>
     90;;<Description>
     91;;<Text>@@PROBLEMDESCRIPTION@@</Text>
     92;;<Code>
     93;;<Value>@@PROBLEMCODEVALUE@@</Value>
     94;;<CodingSystem>ICD9CM</CodingSystem>
     95;;<Version>@@PROBLEMCODINGVERSION@@</Version>
     96;;</Code>
     97;;</Description>
     98;;<Source>
     99;;<Actor>
     100;;<ActorID>@@PROBLEMSOURCEACTORID@@</ActorID>
     101;;</Actor>
     102;;</Source>
     103;;</Problem>
     104;;</Problems>
     105;;<FamilyHistory>
     106;;<FamilyProblemHistory>
     107;;<CCRDataObjectID>@@FAMILYHISTORYOBJECTID@@</CCRDataObjectID>
     108;;<Source>
     109;;<Actor>
     110;;<ActorID>@@FAMILYHISTORYACTORID@@</ActorID>
     111;;</Actor>
     112;;</Source>
     113;;<FamilyMember>
     114;;<ActorID>@@FAMILYMEMBERACTORID@@</ActorID>
     115;;<ActorRole>
     116;;<Text>@@FAMILYMEMBERACTORROLETEXT@@</Text>
     117;;</ActorRole>
     118;;<Source>
     119;;<Actor>
     120;;<ActorID>@@FAMILYMEMBERSOURCACTORID@@</ActorID>
     121;;</Actor>
     122;;</Source>
     123;;</FamilyMember>
     124;;<Problem>
     125;;<Type>
     126;;<Text>Problem</Text>
     127;;</Type>
     128;;<Description>
     129;;<Text>Heart Disease</Text>
     130;;<Code>
     131;;<Value>C0018799</Value>
     132;;<CodingSystem>UMLS Concept</CodingSystem>
     133;;<Version>2006</Version>
     134;;</Code>
     135;;<Code>
     136;;<Value>429.9</Value>
     137;;<CodingSystem>ICD9CM</CodingSystem>
     138;;<Version>2006</Version>
     139;;</Code>
     140;;<Code>
     141;;<Value>56265001</Value>
     142;;<CodingSystem>SNOMEDCT</CodingSystem>
     143;;<Version>2006</Version>
     144;;</Code>
     145;;</Description>
     146;;<Source>
     147;;<Actor>
     148;;<ActorID>AA0001</ActorID>
     149;;</Actor>
     150;;</Source>
     151;;</Problem>
     152;;</FamilyProblemHistory>
     153;;<FamilyProblemHistory>
     154;;<CCRDataObjectID>BB0003</CCRDataObjectID>
     155;;<Source>
     156;;<Actor>
     157;;<ActorID>AA0001</ActorID>
     158;;</Actor>
     159;;</Source>
     160;;<FamilyMember>
     161;;<ActorID>AA0004</ActorID>
     162;;<ActorRole>
     163;;<Text>Grandparents</Text>
     164;;</ActorRole>
     165;;<Source>
     166;;<Actor>
     167;;<ActorID>AA0001</ActorID>
     168;;</Actor>
     169;;</Source>
     170;;</FamilyMember>
     171;;<Problem>
     172;;<Type>
     173;;<Text>Problem</Text>
     174;;</Type>
     175;;<Description>
     176;;<Text>Arthritis</Text>
     177;;<Code>
     178;;<Value>C0003873</Value>
     179;;<CodingSystem>UMLS Concept</CodingSystem>
     180;;<Version>2006</Version>
     181;;</Code>
     182;;<Code>
     183;;<Value>714.0</Value>
     184;;<CodingSystem>ICD9CM</CodingSystem>
     185;;<Version>2006</Version>
     186;;</Code>
     187;;<Code>
     188;;<Value>69896004</Value>
     189;;<CodingSystem>SNOMEDCT</CodingSystem>
     190;;<Version>2006</Version>
     191;;</Code>
     192;;</Description>
     193;;<Source>
     194;;<Actor>
     195;;<ActorID>AA0001</ActorID>
     196;;</Actor>
     197;;</Source>
     198;;</Problem>
     199;;<Problem>
     200;;<Type>
     201;;<Text>Problem</Text>
     202;;</Type>
     203;;<Description>
     204;;<Text>Diabetes Mellitus</Text>
     205;;<Code>
     206;;<Value>C0375113</Value>
     207;;<CodingSystem>UMLS Concept</CodingSystem>
     208;;<Version>2006</Version>
     209;;</Code>
     210;;<Code>
     211;;<Value>250.00</Value>
     212;;<CodingSystem>ICD9CM</CodingSystem>
     213;;<Version>2006</Version>
     214;;</Code>
     215;;</Description>
     216;;<Source>
     217;;<Actor>
     218;;<ActorID>AA0001</ActorID>
     219;;</Actor>
     220;;</Source>
     221;;</Problem>
     222;;<Problem>
     223;;<Type>
     224;;<Text>Problem</Text>
     225;;</Type>
     226;;<Description>
     227;;<Text>Parkinson's disease NOS</Text>
     228;;<Code>
     229;;<Value>332.0</Value>
     230;;<CodingSystem>ICD9CM</CodingSystem>
     231;;<Version>2007</Version>
     232;;</Code>
     233;;</Description>
     234;;<Source>
     235;;<Actor>
     236;;<ActorID>AA0001</ActorID>
     237;;</Actor>
     238;;</Source>
     239;;</Problem>
     240;;</FamilyProblemHistory>
     241;;</FamilyHistory>
     242;;<SocialHistory>
     243;;<SocialHistoryElement>
     244;;<CCRDataObjectID>@@SOCIALHISTORYOBJECTID@@</CCRDataObjectID>
     245;;<Type>
     246;;<Text>@@SOCIALHISTORYTYPETEXT@@</Text>
     247;;</Type>
     248;;<Description>
     249;;<Text>@@SOCIALHISTORYDESCRIPTIONTEXT@@</Text>
     250;;</Description>
     251;;<Source>
     252;;<Actor>
     253;;<ActorID>@@SOCIALHISTORYSOURCACTORID@@</ActorID>
     254;;</Actor>
     255;;</Source>
     256;;</SocialHistoryElement>
     257;;<SocialHistoryElement>
     258;;<CCRDataObjectID>BB0005</CCRDataObjectID>
     259;;<Type>
     260;;<Text>Ethnic Origin</Text>
     261;;</Type>
     262;;<Description>
     263;;<Text>Not Hispanic or Latino</Text>
     264;;</Description>
     265;;<Source>
     266;;<Actor>
     267;;<ActorID>AA0001</ActorID>
     268;;</Actor>
     269;;</Source>
     270;;</SocialHistoryElement>
     271;;<SocialHistoryElement>
     272;;<CCRDataObjectID>BB0006</CCRDataObjectID>
     273;;<Type>
     274;;<Text>Race</Text>
     275;;</Type>
     276;;<Description>
     277;;<Text>White</Text>
     278;;</Description>
     279;;<Source>
     280;;<Actor>
     281;;<ActorID>AA0001</ActorID>
     282;;</Actor>
     283;;</Source>
     284;;</SocialHistoryElement>
     285;;<SocialHistoryElement>
     286;;<CCRDataObjectID>BB0007</CCRDataObjectID>
     287;;<Type>
     288;;<Text>Occupation</Text>
     289;;</Type>
     290;;<Description>
     291;;<Text>Physician</Text>
     292;;</Description>
     293;;<Source>
     294;;<Actor>
     295;;<ActorID>AA0001</ActorID>
     296;;</Actor>
     297;;</Source>
     298;;</SocialHistoryElement>
     299;;</SocialHistory>
     300;;<Medications>
     301;;<Medication>
     302;;<CCRDataObjectID>@@MEDICATIONOBJECTID@@</CCRDataObjectID>
     303;;<DateTime>
     304;;<Type>
     305;;<Text>@@MEDICATIONDATETIMETEXT@@</Text>
     306;;</Type>
     307;;<Age>
     308;;<Value>@@MEDICATIONDATETIMEAGE@@</Value>
     309;;<Units>
     310;;<Unit>@@MEDICATIONDATETIMEAGEUNITS@@</Unit>
     311;;</Units>
     312;;</Age>
     313;;</DateTime>
     314;;<Type>
     315;;<Text>@@MEDICATIONTYPETEXT@@</Text>
     316;;</Type>
     317;;<Status>
     318;;<Text>@@MEDICATIONSTATUSTEXT@@</Text>
     319;;</Status>
     320;;<Source>
     321;;<Actor>
     322;;<ActorID>@@MEDICATIONSOURCEACTORID@@</ActorID>
     323;;</Actor>
     324;;</Source>
     325;;<Product>
     326;;<ProductName>
     327;;<Text>@@MEDICATIONPRODUCTNAMETEXT@@</Text>
     328;;<Code>
     329;;<Value>@@MEDICATIONPRODUCTNAMECODEVALUE@@</Value>
     330;;<CodingSystem>@@MEDICATIONPRODUCTNAMECODINGINGSYSTEM@@</CodingSystem>
     331;;<Version>@@MEDICATIONPRODUCTNAMECODEVERSION@@</Version>
     332;;</Code>
     333;;</ProductName>
     334;;<BrandName>
     335;;<Text>@@MEDICATIONBRANDNAMETEXT@@</Text>
     336;;<Code>
     337;;<Value>@@MEDICATIONBRANDNAMECODEVALUE@@</Value>
     338;;<CodingSystem>@@MEDICATIONBRANDNAMECODINGSYSTEM@@</CodingSystem>
     339;;<Version>@@MEDICATIONBRANDNAMECODEVERSION@@</Version>
     340;;</Code>
     341;;</BrandName>
     342;;<Strength>
     343;;<Value>@@MEDICATIONSTRENGTHVALUE@@</Value>
     344;;<Units>
     345;;<Unit>@@MEDICATIONSTRENGTHUNIT@@</Unit>
     346;;</Units>
     347;;</Strength>
     348;;<Form>
     349;;<Text>@@MEDICATIONFORMTEXT@@</Text>
     350;;</Form>
     351;;</Product>
     352;;<Directions>
     353;;<Direction>
     354;;<Description>
     355;;<Text>@@MEDICATIONDIRECTIONDESCRIPTIONTEXT@@</Text>
     356;;</Description>
     357;;<Dose>
     358;;<Value>@@MEDICATIONDIRECTIONDOSEVALUE@@</Value>
     359;;</Dose>
     360;;<Route>
     361;;<Text>@@MEDICATIONDIRECTIONROUTETEXT@@</Text>
     362;;</Route>
     363;;<Frequency>
     364;;<Value>@@MEDICATIONDIRECTIONFREQUENCYVALUE@@</Value>
     365;;</Frequency>
     366;;</Direction>
     367;;</Directions>
     368;;</Medication>
     369;;</Medications>
     370;;<VitalSigns>
     371;;<Result>
     372;;<CCRDataObjectID>@@VITALSIGNSDATAOBJECTID@@</CCRDataObjectID>
     373;;<DateTime>
     374;;<Type>
     375;;<Text>@@VITALSIGNSDATETIMETYPETEXT@@</Text>
     376;;</Type>
     377;;<ExactDateTime>@@VITALSIGNSEXACTDATETIME@@</ExactDateTime>
     378;;</DateTime>
     379;;<Description>
     380;;<Text>@@VITALSIGNSDESCRIPTIONTEXT@@</Text>
     381;;</Description>
     382;;<Source>
     383;;<Actor>
     384;;<ActorID>@@VITALSIGNSSOURCEACTORID@@</ActorID>
     385;;</Actor>
     386;;</Source>
     387;;<Test>
     388;;<CCRDataObjectID>@@VITALSIGNSTESTOBJECTID@@</CCRDataObjectID>
     389;;<Type>
     390;;<Text>@@VITALSIGNSTESTTYPETEXT@@</Text>
     391;;</Type>
     392;;<Description>
     393;;<Text>@@VITALSIGNSDESCRIPTIONTEXT@@</Text>
     394;;<Code>
     395;;<Value>@@VITALSIGNSDESCRIPTIONCODEVALUE@@</Value>
     396;;<CodingSystem>@@VITALSIGNSDESCRIPTIONCODINGSYSTEM@@</CodingSystem>
     397;;<Version>@@VITALSIGNSCODEVERSION@@</Version>
     398;;</Code>
     399;;</Description>
     400;;<Source>
     401;;<Actor>
     402;;<ActorID>@@VITALSIGNSTESTSOURCEACTORID@@</ActorID>
     403;;</Actor>
     404;;</Source>
     405;;<TestResult>
     406;;<Value>@@VITALSIGNSTESTRESULTVALUE@@</Value>
     407;;<Units>
     408;;<Unit>@@VITALSIGNSTESTRESULTUNIT@@</Unit>
     409;;</Units>
     410;;</TestResult>
     411;;</Test>
     412;;</Result>
     413;;</VitalSigns>
     414;;<HealthCareProviders>
     415;;<Provider>
     416;;<ActorID>AA0005</ActorID>
     417;;<ActorRole>
     418;;<Text>Primary Provider</Text>
     419;;</ActorRole>
     420;;</Provider>
     421;;</HealthCareProviders>
     422;;</Body>
     423;;<Actors>
     424;;<Actor>
     425;;<ActorObjectID>@@ACTOROBJECTID@@</ActorObjectID>
     426;;<Person>
     427;;<Name>
     428;;<CurrentName>
     429;;<Given>@@ACTORGIVENNAME@@</Given>
     430;;<Middle>@@ACTORMIDDLENAME@@</Middle>
     431;;<Family>@@ACTORFAMILYNAME@@</Family>
     432;;</CurrentName>
     433;;</Name>
     434;;<DateOfBirth>
     435;;<ExactDateTime>@@ACTORDATEOFBIRTH@@</ExactDateTime>
     436;;</DateOfBirth>
     437;;<Gender>
     438;;<Text>@@ACTORGENDER@@</Text>
     439;;</Gender>
     440;;</Person>
     441;;<IDs>
     442;;<Type>
     443;;<Text>SSN</Text>
     444;;</Type>
     445;;<ID>@@ACTORSSN@@</ID>
     446;;<Source>
     447;;<Actor>
     448;;<ActorID>@@ACTORSSNSOURCEID@@</ActorID>
     449;;</Actor>
     450;;</Source>
     451;;</IDs>
     452;;<Address>
     453;;<Type>
     454;;<Text>@@ACTORADDRESSTYPE@@</Text>
     455;;</Type>
     456;;<Line1>@@ACTORADDRESSLINE1@@</Line1>
     457;;<Line2>@@ACTORADDRESSLINE2@@</Line2>
     458;;<City>@@ACTORADDRESSCITY@@</City>
     459;;<State>@@ACTORADDRESSSTATE@@</State>
     460;;<PostalCode>@@ACTORADDRESSZIPCODE@@</PostalCode>
     461;;</Address>
     462;;<Telephone>
     463;;<Value>@@ACTORTELEPHONE@@</Value>
     464;;<Type>
     465;;<Text>@@ACTORTELEPHONETYPE@@</Text>
     466;;</Type>
     467;;</Telephone>
     468;;<EMail>
     469;;<Value>@@ACTOREMAIL@@</Value>
     470;;</EMail>
     471;;<Source>
     472;;<Actor>
     473;;<ActorID>@@ACTORADDRESSSOURCEID@@</ActorID>
     474;;</Actor>
     475;;</Source>
     476;;</Actor>
     477;;<Actor>
     478;;<ActorObjectID>@@ACTOROBJECTID@@</ActorObjectID>
     479;;<InformationSystem>
     480;;<Name>@@ACTORINFOSYSNAME@@</Name>
     481;;<Version>@@ACTORINFOSYSVER@@</Version>
     482;;</InformationSystem>
     483;;<Source>
     484;;<Actor>
     485;;<ActorID>@@ACTORINFOSYSSOURCEID@@</ActorID>
     486;;</Actor>
     487;;</Source>
     488;;</Actor>
     489;;<Actor>
     490;;<ActorObjectID>AA0003</ActorObjectID>
     491;;<Person>
     492;;<Name>
     493;;<DisplayName>@@ACTORDISPLAYNAME@@</DisplayName>
     494;;</Name>
     495;;</Person>
     496;;<Relation>
     497;;<Text>@@ACTORRELATION@@</Text>
     498;;</Relation>
     499;;<Source>
     500;;<Actor>
     501;;<ActorID>@@ACTORRELATIONSOURCEID@@</ActorID>
     502;;</Actor>
     503;;</Source>
     504;;</Actor>
     505;;<Actor>
     506;;<ActorObjectID>@@ACTOROBJECTID@@</ActorObjectID>
     507;;<Person>
     508;;<Name>
     509;;<CurrentName>
     510;;<Given>@@ACTORGIVENNAME@@</Given>
     511;;<Family>@@ACTORFAMILYNAME@@</Family>
     512;;</CurrentName>
     513;;</Name>
     514;;</Person>
     515;;<Specialty>
     516;;<Text>@@ACTORSPECIALITY@@</Text>
     517;;</Specialty>
     518;;<Address>
     519;;<Type>
     520;;<Text>@@ACTORADDRESSTYPE@@</Text>
     521;;</Type>
     522;;<Line1>@@ACTORADDRESSLINE1@@</Line1>
     523;;<City>@@ACTORADDRESSLINE2@@</City>
     524;;<State>@@ACTORADDRESSSTATE@@</State>
     525;;</Address>
     526;;<Source>
     527;;<Actor>
     528;;<ActorID>@@ACTORSOURCEID@@</ActorID>
     529;;</Actor>
     530;;</Source>
     531;;</Actor>
     532;;</Actors>
     533;;<Signatures>
     534;;<CCRSignature>
     535;;<SignatureObjectID>S0001</SignatureObjectID>
     536;;<ExactDateTime>2008-03-18T23:10:58Z</ExactDateTime>
     537;;<Source>
     538;;<ActorID>AA0001</ActorID>
     539;;</Source>
     540;;<Signature>
     541;;<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
     542;;<SignedInfo>
     543;;<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
     544;;<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
     545;;<Reference URI="">
     546;;<Transforms>
     547;;<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
     548;;</Transforms>
     549;;<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
     550;;<DigestValue>YFveLLyo+75P7rSciv0/m1O6Ot4=</DigestValue>
     551;;</Reference>
     552;;</SignedInfo>
     553;;<SignatureValue>Bj6sACXl74hrlbUYnu8HqnRab5VGy69BOYjOH7dETxgppXMEd7AoVYaePZvgJft78JR4oQY76hbFyGcIslYauPpJxx2hCd5d56xFeaQg01R6AQOvGnhjlq63TbpFdUq0B4tYsmiibJPbQJhTQe+TcWTBvWaQt8Fkk5blO571YvI=</SignatureValue>
     554;;<KeyInfo>
     555;;<KeyValue>
     556;;<RSAKeyValue>
     557;;<Modulus>meH817QYol+/uUEg6j8Mg89s7GTlaN9B+/CGlzrtnQH+swMigZRnEPxHVO8PhEymP/W9nlhAjTScV/CUzA9yJ9WiaOn17c+KReKhfBqL24DX9BpbJ+kLYVz7mBO5Qydk5AzUT2hFwW93irD8iRKP+/t+2Mi2CjNfj8VTjJpHpm0=</Modulus>
     558;;<Exponent>AQAB</Exponent>
     559;;</RSAKeyValue>
     560;;</KeyValue>
     561;;</KeyInfo>
     562;;</Signature>
     563;;</Signature>
     564;;</CCRSignature>
     565;;</Signatures>
     566;;</ContinuityOfCareRecord>
     567;</TEMPLATE>
  • ccr/trunk/p/GPLVITALS.m

    r34 r36  
    1 GPLVITALS       ; CCDCCR/GPL - CCR/CCD PROCESSING FOR VITALS ; 6/6/08
    2         ;;0.1;CCDCCR;nopatch;noreleasedate
     1GPLVITALS       ; CCDCCR/CJE - CCR/CCD PROCESSING FOR VITALS ; 07/03/08
     2                ;;0.1;CCDCCR;;JUL 3,2008;
    33EXTRACT(VITXML,DFN,VITOUTXML)   ; EXTRACT PROBLEMS INTO PROVIDED XML TEMPLATE
    4            ;
    5            ; VITXML AND OUTXML ARE PASSED BY NAME SO GLOBALS CAN BE USED
    6            ; IVITXML WILL CONTAIN ONLY THE VITALS SECTION OF THE OVERALL TEMPLATE
    7            ;
    8            N VITRSLT,J,K,VITPTMP,X,VITVMAP,TBUF
    9            D VITALS^ORQQVI(.VITRSLT,DFN,"","")
    10            I '$D(VITRSLT(1)) W "ERROR RUNNINIG VITALS RPC",! Q
    11            ;ZWR RPCRSLT
    12            S VITTVMAP=$NA(^TMP($J,"VITALS"))
    13            S VITTARYTMP=$NA(^TMP($J,"VITALARYTMP"))
    14            F J=1:1:VITRSLT(1)  D  ; FOR EACH VITAL IN THE LIST
    15            . I $D(VITRSLT(J)) D 
    16            . . S VITVMAP=$NA(@VITTVMAP@(J))
    17            . . K @VITVMAP
    18            . . I DEBUG W "VMAP= ",VMAP,!
    19            . . S VITPTMP=VITRSLT(J) ; PULL OUT VITAL FROM RPC RETURN ARRAY
    20            . . S @VITVMAP@("DATAOBJECTID")="VITAL"_J ; UNIQUE OBJID FOR VITAL
    21            . . I $P(VITPTMP,U,2)="HT" D
    22            . . . S @VITVMAP@("HEIGHTWEIGHTDATATIME")=$P(VITPTMP,U,4)
    23            . . . S @VITVMAP@("HEIGHTWEIGHTSOURCE")=$P(VITPTMP,U,7)
    24            . . . S @VITVMAP@("HEIGHTSOURCEID")=$P(VITPTMP,U,1)
    25            . . . S @VITVMAP@("HEIGHTINCHES")=$P(VITPTMP,U,3)
    26            . . I $P(VITPTMP,U,2)="WT" D
    27            . . . S @VITVMAP@("WEIGHTSOURCEID")=$P(VITPTMP,U,1)
    28            . . . S @VITVMAP@("WEIGHTLBS")=$P(VITPTMP,U,3)
    29            . . S VITARYTMP=$NA(@VITTARYTMP@(J))
    30            . . K @VITARYTMP
    31            . . D MAP^GPLXPATH(VITXML,VITVMAP,VITARYTMP)
    32            . . I J=1 D  ; FIRST ONE IS JUST A COPY
    33            . . . ; W "FIRST ONE",!
    34            . . . D CP^GPLXPATH(VITARYTMP,VITOUTXML)
    35            . . . ; W "OUTXML ",OUTXML,!
    36            . . I J>1 D  ; AFTER THE FIRST, INSERT INNER XML
    37            . . . D INSINNER^GPLXPATH(VITOUTXML,VITARYTMP)
    38            ;ZWR ^TMP($J,"VITALS",*)
    39            ;ZWR ^TMP($J,"VITALARYTMP",*) ; SHOW THE RESULTS
    40            ; W "OUT OF FOR LOOP.",!
    41            ;ZWR
    42            ; ZWR @OUTXML
    43            ; $$HTML^DILF(
    44            N VITTMP,I
    45            D MISSING^GPLXPATH(VITXML,"VITTMP") ; SEARCH XML FOR MISSING VARS
    46            I VITTMP(0)>0 D  ; IF THERE ARE MISSING VARS - MARKED AS @@X@@
    47            . W "VITALS MISSING ",!
    48            . F I=1:1:VITTMP(0) W VITTMP(I),!
    49            Q
     4        ;
     5        ; VITXML AND OUTXML ARE PASSED BY NAME SO GLOBALS CAN BE USED
     6        ; IVITXML WILL CONTAIN ONLY THE VITALS SECTION OF THE OVERALL TEMPLATE
     7        ;
     8        N VITRSLT,J,K,VITPTMP,X,VITVMAP,TBUF
     9        D VITALS^ORQQVI(.VITRSLT,DFN,"","")
     10        I '$D(VITRSLT(1)) W "ERROR RUNNINIG VITALS RPC",! Q
     11        ; ZWR RPCRSLT
     12        S VITTVMAP=$NA(^TMP($J,"VITALS"))
     13        S VITTARYTMP=$NA(^TMP($J,"VITALARYTMP"))
     14        F J=1:1:VITRSLT(1)  D  ; FOR EACH VITAL IN THE LIST
     15        . I $D(VITRSLT(J)) D 
     16        . . S VITVMAP=$NA(@VITTVMAP@(J))
     17        . . K @VITVMAP
     18        . . I DEBUG W "VMAP= ",VMAP,!
     19        . . S VITPTMP=VITRSLT(J) ; PULL OUT VITAL FROM RPC RETURN ARRAY
     20        . . S @VITVMAP@("VITALSIGNSDATAOBJECTID")="VITAL"_J ; UNIQUE OBJID FOR VITAL
     21        . . I $P(VITPTMP,U,2)="HT" D
     22        . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED"
     23        . . . S @VITVMAP@("VITALSIGNSEXACTDATETIME")=$$FMDTOUTC^CCRUTIL($P(VITPTMP,U,4),"DT")
     24        . . . W "CONVERTED DATE TIME: ",@VITVMAP@("VITALSIGNSEXACTDATETIME"),!
     25        . . . S @VITVMAP@("VITALSIGNSDESCRIPTIONTEXT")="HEIGHT"
     26        . . . ;S @VITVMAP@("VITALSIGNSSOURCEACTORID")=""
     27        . . . S @VITVMAP@("VITALSIGNSTESTOBJECTID")="VITALTEST"_J
     28        . . . S @VITVMAP@("VITALSIGNSTESTTYPETEXT")="OBSERVED"
     29        . . . S @VITVMAP@("VITALSIGNSDESCRIPTIONTEXT")="HEIGHT"
     30        . . . ;S @VITVMAP@("VITALSIGNSDESCRIPTIONCODEVALUE")=""
     31        . . . ;S @VITVMAP@("VITALSIGNSDESCRIPTIONCODINGSYSTEM")=""
     32        . . . ;S @VITVMAP@("VITALSIGNSDESCRIPTIONCODEVERSION")=""
     33        . . . ;S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")=""
     34        . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P(VITPTMP,U,3)
     35        . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="in"
     36        . . . ;S @VITVMAP@("HEIGHTWEIGHTSOURCE")=$P(VITPTMP,U,7)
     37        . . E  I $P(VITPTMP,U,2)="WT" D
     38        . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED"
     39        . . . S @VITVMAP@("VITALSIGNSEXACTDATETIME")=$$FMDTOUTC^CCRUTIL($P(VITPTMP,U,4),"DT")
     40        . . . S @VITVMAP@("VITALSIGNSDESCRIPTIONTEXT")="WEIGHT"
     41        . . . ;S @VITVMAP@("VITALSIGNSSOURCEACTORID")=""
     42        . . . S @VITVMAP@("VITALSIGNSTESTOBJECTID")="VITALTEST"_J
     43        . . . S @VITVMAP@("VITALSIGNSTESTTYPETEXT")="OBSERVED"
     44        . . . S @VITVMAP@("VITALSIGNSDESCRIPTIONTEXT")="WEIGHT"
     45        . . . ;S @VITVMAP@("VITALSIGNSDESCRIPTIONCODEVALUE")=""
     46        . . . ;S @VITVMAP@("VITALSIGNSDESCRIPTIONCODINGSYSTEM")=""
     47        . . . ;S @VITVMAP@("VITALSIGNSDESCRIPTIONCODEVERSION")=""
     48        . . . ;S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")=""
     49        . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P(VITPTMP,U,3)
     50        . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="lbs"
     51        . . E  D
     52        . . . ;W "IN VITAL:  OTHER",!
     53        . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED"
     54        . . . S @VITVMAP@("VITALSIGNSEXACTDATETIME")=$$FMDTOUTC^CCRUTIL($P(VITPTMP,U,4),"DT")
     55        . . . S @VITVMAP@("VITALSIGNSDESCRIPTIONTEXT")="OTHER VITAL"
     56        . . . S @VITVMAP@("VITALSIGNSSOURCEACTORID")=""
     57        . . . S @VITVMAP@("VITALSIGNSTESTOBJECTID")="VITALTEST"_J
     58        . . . S @VITVMAP@("VITALSIGNSTESTTYPETEXT")="OBSERVED"
     59        . . . S @VITVMAP@("VITALSIGNSDESCRIPTIONTEXT")="OTHER"
     60        . . . S @VITVMAP@("VITALSIGNSDESCRIPTIONCODEVALUE")=""
     61        . . . S @VITVMAP@("VITALSIGNSDESCRIPTIONCODINGSYSTEM")=""
     62        . . . S @VITVMAP@("VITALSIGNSDESCRIPTIONCODEVERSION")=""
     63        . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")=""
     64        . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P(VITPTMP,U,3)
     65        . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="UNKNOWN"
     66        . . . ;S @VITVMAP@("HEIGHTWEIGHTSOURCE")=$P(VITPTMP,U,7)
     67        . . S VITARYTMP=$NA(@VITTARYTMP@(J))
     68        . . K @VITARYTMP
     69        . . D MAP^GPLXPATH(VITXML,VITVMAP,VITARYTMP)
     70        . . I J=1 D  ; FIRST ONE IS JUST A COPY
     71        . . . ; W "FIRST ONE",!
     72        . . . D CP^GPLXPATH(VITARYTMP,VITOUTXML)
     73        . . . ; W "OUTXML ",OUTXML,!
     74        . . I J>1 D  ; AFTER THE FIRST, INSERT INNER XML
     75        . . . D INSINNER^GPLXPATH(VITOUTXML,VITARYTMP)
     76        ; ZWR ^TMP($J,"VITALS",*)
     77        ; ZWR ^TMP($J,"VITALARYTMP",*) ; SHOW THE RESULTS
     78        ; ZWR @OUTXML
     79        N VITTMP,I
     80        D MISSING^GPLXPATH(VITOUTXML,"VITTMP") ; SEARCH XML FOR MISSING VARS
     81        I VITTMP(0)>0 D  ; IF THERE ARE MISSING VARS - MARKED AS @@X@@
     82        . W "VITALS MISSING ",!
     83        . F I=1:1:VITTMP(0) W VITTMP(I),!
     84        Q
     85        ;
Note: See TracChangeset for help on using the changeset viewer.