Changeset 74


Ignore:
Timestamp:
Jul 25, 2008, 10:01:34 PM (16 years ago)
Author:
George Lilly
Message:

First commit for CCD

Location:
ccr/trunk/p
Files:
2 added
4 edited

Legend:

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

    r60 r74  
    6262          Q
    6363          ;
    64 ;<TEMPLATE>
    65 ;;<?xml version="1.0"?>
    66 ;;<?xml-stylesheet type="text/xsl" href="CCD.xsl"?>
    67 ;;<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
    68 ;;<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
    69 ;;<templateId root="2.16.840.1.113883.10.20.1"/>
    70 ;;<id root="db734647-fc99-424c-a864-7e3cda82e703"/>
    71 ;;<code code="34133-9" codeSystem="2.16.840.1.113883.6.1" displayName="Summarization of episode note"/>
    72 ;;<title>< value="DOCTITLE"/>@@DOCTITLE@@Good Health Clinic Continuity of Care Document</title>
    73 ;;<effectiveTime value="@@EFFECTIVETIME@@20000407130000+0500"/>
    74 ;;<confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/>
    75 ;;<languageCode code="en-US"/>
    76 ;;<recordTarget>
    77 ;;<patientRole>
    78 ;;<id extension="996-756-495" root="2.16.840.1.113883.19.5"/>
    79 ;;<patient>
    80 ;;<name>
    81 ;;<given>@@PATIENTGIVENNAME@@</given>
    82 ;;<family>@@PATIENTFAMILYNAME@@</family>
    83 ;;<suffix>@@PATIENTNAMESUFFIX@@</suffix>
    84 ;;</name>
    85 ;;<administrativeGenderCode code="@@PATIENTGENDER@@M" codeSystem="2.16.840.1.113883.5.1"/>
    86 ;;<birthTime value="@@PATIENTDATEOFBIRTH@@19320924"/>
    87 ;;</patient>
    88 ;;<providerOrganization>
    89 ;;<id root="2.16.840.1.113883.19.5"/>
    90 ;;<name>@@SITENAME@@Good Health Clinic</name>
    91 ;;</providerOrganization>
    92 ;;</patientRole>
    93 ;;</recordTarget>
    94 ;;<author>
    95 ;;<time value="20000407130000+0500"/>
    96 ;;<assignedAuthor>
    97 ;;<id root="20cf14fb-b65c-4c8c-a54d-b0cca834c18c"/>
    98 ;;<assignedPerson>
    99 ;;<name><prefix>Dr.</prefix><given>@@AUTHORGIVENNAME@@Robert</given><family>@@AUTHORFAMILYNAME@@Dolin</family></name>
    100 ;;</assignedPerson>
    101 ;;<representedOrganization>
    102 ;;<id root="2.16.840.1.113883.19.5"/>
    103 ;;<name>@@AUTHORSITE@@Good Health Clinic</name>
    104 ;;</representedOrganization>
    105 ;;</assignedAuthor>
    106 ;;</author>
    107 ;;<informant>
    108 ;;<assignedEntity>
    109 ;;<id nullFlavor="NI"/>
    110 ;;<representedOrganization>
    111 ;;<id root="2.16.840.1.113883.19.5"/>
    112 ;;<name>@@INFORMANTORG@@Good Health Clinic</name>
    113 ;;</representedOrganization>
    114 ;;</assignedEntity>
    115 ;;</informant>
    116 ;;<custodian>
    117 ;;<assignedCustodian>
    118 ;;<representedCustodianOrganization>
    119 ;;<id root="2.16.840.1.113883.19.5"/>
    120 ;;<name>@@CUSTODIANORG@@Good Health Clinic</name>
    121 ;;</representedCustodianOrganization>
    122 ;;</assignedCustodian>
    123 ;;</custodian>
    124 ;;<legalAuthenticator>
    125 ;;<time value="20000407130000+0500"/>
    126 ;;<signatureCode code="S"/>
    127 ;;<assignedEntity>
    128 ;;<id nullFlavor="NI"/>
    129 ;;<representedOrganization>
    130 ;;<id root="2.16.840.1.113883.19.5"/>
    131 ;;<name>@@LEGALORG@@Good Health Clinic</name>
    132 ;;</representedOrganization>
    133 ;;</assignedEntity>
    134 ;;</legalAuthenticator>
    135 ;;<participant typeCode="IND">
    136 ;;<associatedEntity classCode="GUAR">
    137 ;;<id root="4ff51570-83a9-47b7-91f2-93ba30373141"/>
    138 ;;<addr>
    139 ;;<streetAddressLine>@@GUARSTREET@@17 Daws Rd.</streetAddressLine>
    140 ;;<city>@@GUARCITY@@Blue Bell</city>
    141 ;;<state>@@GUARSTATE@@MA</state>
    142 ;;<postalCode>@@GUARZIP@@02368</postalCode>
    143 ;;</addr>
    144 ;;<telecom value="tel:@@GUARTELE@@(888)555-1212"/>
    145 ;;<associatedPerson>
    146 ;;<name>
    147 ;;<given>@@GUARGIVENNAME@@Kenneth</given>
    148 ;;<family>@@GUARFAMILYNAME@@Ross</family>
    149 ;;</name>
    150 ;;</associatedPerson>
    151 ;;</associatedEntity>
    152 ;;</participant>
    153 ;;<participant typeCode="IND">
    154 ;;<associatedEntity classCode="NOK">
    155 ;;<id root="4ac71514-6a10-4164-9715-f8d96af48e6d"/>
    156 ;;<code code="65656005" codeSystem="2.16.840.1.113883.6.96" displayName="@@NOKRELATION@@Biiological mother"/>
    157 ;;<telecom value="tel:@@NOKTELE@@(999)555-1212"/>
    158 ;;<associatedPerson>
    159 ;;<name>
    160 ;;<given>@@NOKGIVENNAME@@Henrietta</given>
    161 ;;<family>@@NOKFAMILYNAME@@Levin</family>
    162 ;;</name>
    163 ;;</associatedPerson>
    164 ;;</associatedEntity>
    165 ;;</participant>
    166 ;;<documentationOf>
    167 ;;<serviceEvent classCode="PCPR">
    168 ;;<effectiveTime><low value="@@DOCPERIODLOW@@19320924"/><high value="@@DOCPERIODHIGH@@20000407"/></effectiveTime>
    169 ;;<performer typeCode="PRF">
    170 ;;<functionCode code="PCP" codeSystem="2.16.840.1.113883.5.88"/>
    171 ;;<time><low value="@@PCPPERIODLOW@@1990"/><high value='@@PCPPERIODHIGH@@20000407'/></time>
    172 ;;<assignedEntity>
    173 ;;<id root="20cf14fb-b65c-4c8c-a54d-b0cca834c18c"/>
    174 ;;<assignedPerson>
    175 ;;<name><prefix>@@PCPNAMEPREFIX@@Dr.</prefix><given>@@PCPNAMEGIVEN@@Robert</given><family>@@PCPNAMEFAMILY@@Dolin</family></name>
    176 ;;</assignedPerson>
    177 ;;<representedOrganization>
    178 ;;<id root="2.16.840.1.113883.19.5"/>
    179 ;;<name>@@PCPORG@@Good Health Clinic</name>
    180 ;;</representedOrganization>
    181 ;;</assignedEntity>
    182 ;;</performer>
    183 ;;</serviceEvent>
    184 ;;</documentationOf>
    185 ;;<component>
    186 ;;<structuredBody>
    187 ;;<component>
    188 ;;<section>
    189 ;;<templateId root='2.16.840.1.113883.10.20.1.13'/>
    190 ;;<code code="48764-5" codeSystem="2.16.840.1.113883.6.1"/>
    191 ;;<title>Summary Purpose</title>
    192 ;;<text>Transfer of care</text>
    193 ;;<entry typeCode="DRIV">
    194 ;;<act classCode="ACT" moodCode="EVN">
    195 ;;<templateId root='2.16.840.1.113883.10.20.1.30'/>
    196 ;;<code code="23745001" codeSystem="2.16.840.1.113883.6.96" displayName="Documentation procedure"/>
    197 ;;<statusCode code="completed"/>
    198 ;;<entryRelationship typeCode="RSON">
    199 ;;<act classCode="ACT" moodCode="EVN">
    200 ;;<code code="308292007" codeSystem="2.16.840.1.113883.6.96" displayName="@@DOCPURPOSE@@Transfer of care"/>
    201 ;;<statusCode code="completed"/>
    202 ;;</act>
    203 ;;</entryRelationship>
    204 ;;</act>
    205 ;;</entry>
    206 ;;</section>
    207 ;;</component>
    208 ;;<component>
    209 ;;<section>
    210 ;;<templateId root="2.16.840.1.113883.10.20.1.14"/>
    211 ;;<code code="30954-2" codeSystem="2.16.840.1.113883.6.1"/>
    212 ;;<entry typeCode="DRIV">
    213 ;;<organizer classCode="BATTERY" moodCode="EVN">
    214 ;;<templateId root="2.16.840.1.113883.10.20.1.32"/>
    215 ;;<id root="7d5a02b0-67a4-11db-bd13-0800200c9a66"/>
    216 ;;<code code="@@BATTERYCODE@@43789009" codeSystem="@@BATTERYSYSTEM@@2.16.840.1.113883.6.96" displayName="@@BATTERYNAME@@CBC WO DIFFERENTIAL"/>
    217 ;;<statusCode code="completed"/>
    218 ;;<effectiveTime value="@@BATTERYTIME@@200003231430"/>
    219 ;;<component>
    220 ;;<observation classCode="OBS" moodCode="EVN">
    221 ;;<templateId root="2.16.840.1.113883.10.20.1.31"/>
    222 ;;<id root="107c2dc0-67a5-11db-bd13-0800200c9a66"/>
    223 ;;<code code="@@COMPONENTCODE@@30313-1" codeSystem="@@COMPONENTSYSTEM@@2.16.840.1.113883.6.1" displayName="@@COMPONENTNAME@@HGB"/>
    224 ;;<statusCode code="completed"/>
    225 ;;<effectiveTime value="@@COMPONENTTIME@@200003231430"/>
    226 ;;<value xsi:type="@@COMPONENTTYPE@@PQ" value="@@COMPONENTVALUE@13.2" unit="@@COMPONENTUNIT@@g/dl"/>
    227 ;;<interpretationCode code="N" codeSystem="2.16.840.1.113883.5.83"/>
    228 ;;<referenceRange>
    229 ;;<value="OBSERVATIONRANGE"/>
    230 ;;<observationRange>
    231 ;;<text>@@OBSRANGETEXT@@M 13-18 g/dl; F 12-16 g/dl</text>
    232 ;;</observationRange>
    233 ;;</referenceRange>
    234 ;;</observation>
    235 ;;</component>
    236 ;;</organizer>
    237 ;;</entry>
    238 ;;</section>
    239 ;;</component>
    240 ;;</structuredBody>
    241 ;;</component>
    242 ;;</ClinicalDocument>
    243 ;</TEMPLATE>
     64  ;<TEMPLATE>
     65  ;;<?xml version="1.0"?>
     66  ;;<?xml-stylesheet type="text/xsl" href="CCD.xsl"?>
     67  ;;<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
     68  ;;<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
     69  ;;<templateId root="2.16.840.1.113883.10.20.1"/>
     70  ;;<id root="db734647-fc99-424c-a864-7e3cda82e703"/>
     71  ;;<code code="34133-9" codeSystem="2.16.840.1.113883.6.1" displayName="Summarization of episode note"/>
     72  ;;<title>< value="DOCTITLE"/>@@DOCTITLE@@Good Health Clinic Continuity of Care Document</title>
     73  ;;<effectiveTime value="@@EFFECTIVETIME@@20000407130000+0500"/>
     74  ;;<confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/>
     75  ;;<languageCode code="en-US"/>
     76  ;;<recordTarget>
     77  ;;<patientRole>
     78  ;;<id extension="996-756-495" root="2.16.840.1.113883.19.5"/>
     79  ;;<patient>
     80  ;;<name>
     81  ;;<given>@@PATIENTGIVENNAME@@</given>
     82  ;;<family>@@PATIENTFAMILYNAME@@</family>
     83  ;;<suffix>@@PATIENTNAMESUFFIX@@</suffix>
     84  ;;</name>
     85  ;;<administrativeGenderCode code="@@PATIENTGENDER@@M" codeSystem="2.16.840.1.113883.5.1"/>
     86  ;;<birthTime value="@@PATIENTDATEOFBIRTH@@19320924"/>
     87  ;;</patient>
     88  ;;<providerOrganization>
     89  ;;<id root="2.16.840.1.113883.19.5"/>
     90  ;;<name>@@SITENAME@@Good Health Clinic</name>
     91  ;;</providerOrganization>
     92  ;;</patientRole>
     93  ;;</recordTarget>
     94  ;;<author>
     95  ;;<time value="20000407130000+0500"/>
     96  ;;<assignedAuthor>
     97  ;;<id root="20cf14fb-b65c-4c8c-a54d-b0cca834c18c"/>
     98  ;;<assignedPerson>
     99  ;;<name><prefix>Dr.</prefix><given>@@AUTHORGIVENNAME@@Robert</given><family>@@AUTHORFAMILYNAME@@Dolin</family></name>
     100  ;;</assignedPerson>
     101  ;;<representedOrganization>
     102  ;;<id root="2.16.840.1.113883.19.5"/>
     103  ;;<name>@@AUTHORSITE@@Good Health Clinic</name>
     104  ;;</representedOrganization>
     105  ;;</assignedAuthor>
     106  ;;</author>
     107  ;;<informant>
     108  ;;<assignedEntity>
     109  ;;<id nullFlavor="NI"/>
     110  ;;<representedOrganization>
     111  ;;<id root="2.16.840.1.113883.19.5"/>
     112  ;;<name>@@INFORMANTORG@@Good Health Clinic</name>
     113  ;;</representedOrganization>
     114  ;;</assignedEntity>
     115  ;;</informant>
     116  ;;<custodian>
     117  ;;<assignedCustodian>
     118  ;;<representedCustodianOrganization>
     119  ;;<id root="2.16.840.1.113883.19.5"/>
     120  ;;<name>@@CUSTODIANORG@@Good Health Clinic</name>
     121  ;;</representedCustodianOrganization>
     122  ;;</assignedCustodian>
     123  ;;</custodian>
     124  ;;<legalAuthenticator>
     125  ;;<time value="20000407130000+0500"/>
     126  ;;<signatureCode code="S"/>
     127  ;;<assignedEntity>
     128  ;;<id nullFlavor="NI"/>
     129  ;;<representedOrganization>
     130  ;;<id root="2.16.840.1.113883.19.5"/>
     131  ;;<name>@@LEGALORG@@Good Health Clinic</name>
     132  ;;</representedOrganization>
     133  ;;</assignedEntity>
     134  ;;</legalAuthenticator>
     135  ;;<participant typeCode="IND">
     136  ;;<associatedEntity classCode="GUAR">
     137  ;;<id root="4ff51570-83a9-47b7-91f2-93ba30373141"/>
     138  ;;<addr>
     139  ;;<streetAddressLine>@@GUARSTREET@@17 Daws Rd.</streetAddressLine>
     140  ;;<city>@@GUARCITY@@Blue Bell</city>
     141  ;;<state>@@GUARSTATE@@MA</state>
     142  ;;<postalCode>@@GUARZIP@@02368</postalCode>
     143  ;;</addr>
     144  ;;<telecom value="tel:@@GUARTELE@@(888)555-1212"/>
     145  ;;<associatedPerson>
     146  ;;<name>
     147  ;;<given>@@GUARGIVENNAME@@Kenneth</given>
     148  ;;<family>@@GUARFAMILYNAME@@Ross</family>
     149  ;;</name>
     150  ;;</associatedPerson>
     151  ;;</associatedEntity>
     152  ;;</participant>
     153  ;;<participant typeCode="IND">
     154  ;;<associatedEntity classCode="NOK">
     155  ;;<id root="4ac71514-6a10-4164-9715-f8d96af48e6d"/>
     156  ;;<code code="65656005" codeSystem="2.16.840.1.113883.6.96" displayName="@@NOKRELATION@@Biiological mother"/>
     157  ;;<telecom value="tel:@@NOKTELE@@(999)555-1212"/>
     158  ;;<associatedPerson>
     159  ;;<name>
     160  ;;<given>@@NOKGIVENNAME@@Henrietta</given>
     161  ;;<family>@@NOKFAMILYNAME@@Levin</family>
     162  ;;</name>
     163  ;;</associatedPerson>
     164  ;;</associatedEntity>
     165  ;;</participant>
     166  ;;<documentationOf>
     167  ;;<serviceEvent classCode="PCPR">
     168  ;;<effectiveTime><low value="@@DOCPERIODLOW@@19320924"/><high value="@@DOCPERIODHIGH@@20000407"/></effectiveTime>
     169  ;;<performer typeCode="PRF">
     170  ;;<functionCode code="PCP" codeSystem="2.16.840.1.113883.5.88"/>
     171  ;;<time><low value="@@PCPPERIODLOW@@1990"/><high value='@@PCPPERIODHIGH@@20000407'/></time>
     172  ;;<assignedEntity>
     173  ;;<id root="20cf14fb-b65c-4c8c-a54d-b0cca834c18c"/>
     174  ;;<assignedPerson>
     175  ;;<name><prefix>@@PCPNAMEPREFIX@@Dr.</prefix><given>@@PCPNAMEGIVEN@@Robert</given><family>@@PCPNAMEFAMILY@@Dolin</family></name>
     176  ;;</assignedPerson>
     177  ;;<representedOrganization>
     178  ;;<id root="2.16.840.1.113883.19.5"/>
     179  ;;<name>@@PCPORG@@Good Health Clinic</name>
     180  ;;</representedOrganization>
     181  ;;</assignedEntity>
     182  ;;</performer>
     183  ;;</serviceEvent>
     184  ;;</documentationOf>
     185  ;;<component>
     186  ;;<structuredBody>
     187  ;;<component>
     188  ;;<section>
     189  ;;<templateId root='2.16.840.1.113883.10.20.1.13'/>
     190  ;;<code code="48764-5" codeSystem="2.16.840.1.113883.6.1"/>
     191  ;;<title>Summary Purpose</title>
     192  ;;<text>Transfer of care</text>
     193  ;;<entry typeCode="DRIV">
     194  ;;<act classCode="ACT" moodCode="EVN">
     195  ;;<templateId root='2.16.840.1.113883.10.20.1.30'/>
     196  ;;<code code="23745001" codeSystem="2.16.840.1.113883.6.96" displayName="Documentation procedure"/>
     197  ;;<statusCode code="completed"/>
     198  ;;<entryRelationship typeCode="RSON">
     199  ;;<act classCode="ACT" moodCode="EVN">
     200  ;;<code code="308292007" codeSystem="2.16.840.1.113883.6.96" displayName="@@DOCPURPOSE@@Transfer of care"/>
     201  ;;<statusCode code="completed"/>
     202  ;;</act>
     203  ;;</entryRelationship>
     204  ;;</act>
     205  ;;</entry>
     206  ;;</section>
     207  ;;</component>
     208  ;;<component>
     209  ;;<section>
     210  ;;<templateId root="2.16.840.1.113883.10.20.1.14"/>
     211  ;;<code code="30954-2" codeSystem="2.16.840.1.113883.6.1"/>
     212  ;;<entry typeCode="DRIV">
     213  ;;<organizer classCode="BATTERY" moodCode="EVN">
     214  ;;<templateId root="2.16.840.1.113883.10.20.1.32"/>
     215  ;;<id root="7d5a02b0-67a4-11db-bd13-0800200c9a66"/>
     216  ;;<code code="@@BATTERYCODE@@43789009" codeSystem="@@BATTERYSYSTEM@@2.16.840.1.113883.6.96" displayName="@@BATTERYNAME@@CBC WO DIFFERENTIAL"/>
     217  ;;<statusCode code="completed"/>
     218  ;;<effectiveTime value="@@BATTERYTIME@@200003231430"/>
     219  ;;<component>
     220  ;;<observation classCode="OBS" moodCode="EVN">
     221  ;;<templateId root="2.16.840.1.113883.10.20.1.31"/>
     222  ;;<id root="107c2dc0-67a5-11db-bd13-0800200c9a66"/>
     223  ;;<code code="@@COMPONENTCODE@@30313-1" codeSystem="@@COMPONENTSYSTEM@@2.16.840.1.113883.6.1" displayName="@@COMPONENTNAME@@HGB"/>
     224  ;;<statusCode code="completed"/>
     225  ;;<effectiveTime value="@@COMPONENTTIME@@200003231430"/>
     226  ;;<value xsi:type="@@COMPONENTTYPE@@PQ" value="@@COMPONENTVALUE@13.2" unit="@@COMPONENTUNIT@@g/dl"/>
     227  ;;<interpretationCode code="N" codeSystem="2.16.840.1.113883.5.83"/>
     228  ;;<referenceRange>
     229  ;;<value="OBSERVATIONRANGE"/>
     230  ;;<observationRange>
     231  ;;<text>@@OBSRANGETEXT@@M 13-18 g/dl; F 12-16 g/dl</text>
     232  ;;</observationRange>
     233  ;;</referenceRange>
     234  ;;</observation>
     235  ;;</component>
     236  ;;</organizer>
     237  ;;</entry>
     238  ;;</section>
     239  ;;</component>
     240  ;;</structuredBody>
     241  ;;</component>
     242  ;;</ClinicalDocument>
     243  ;</TEMPLATE>
  • ccr/trunk/p/GPLCCR.m

    r70 r74  
    3131       S ODIRGLB=$NA(^TMP("GPLCCR","ODIR"))
    3232       I '$D(@ODIRGLB) D  ; IF NOT ODIR HAS BEEN SET
    33        . ;S @ODIRGLB="/home/glilly/CCROUT"
    34        . S @ODIRGLB="/home/cedwards/"
     33       . S @ODIRGLB="/home/glilly/CCROUT"
     34       . ;S @ODIRGLB="/home/cedwards/"
    3535       . ;S @ODIRGLB="/opt/wv/p/"
    3636       S ODIR=@ODIRGLB
     
    191191 ;;>>>D ZTEST^GPLCCR("CCR")
    192192 ;;>>>W $$TRIM^GPLXPATH(CCRGLO)
     193 ;;><CCD>
     194 ;;>>>K GPL S GPL=""
     195 ;;>>>D CCRRPC^GPLCCR(.GPL,"2","CCD","","","")
     196 ;;>>?@GPL@(@GPL@(0))["</ContinuityOfCareRecord>"
    193197 ;;></TEST>
  • ccr/trunk/p/GPLVITALS.m

    r73 r74  
    3636          . . S VITVMAP=$NA(@VITTVMAP@(J))
    3737          . . K @VITVMAP
    38           . . I DEBUG W "VMAP= ",VMAP,!
     38          . . I DEBUG W "VMAP= ",VITVMAP,!
    3939          . . S VITPTMP=VITRSLT(J) ; PULL OUT VITAL FROM RPC RETURN ARRAY
    4040          . . S @VITVMAP@("VITALSIGNSDATAOBJECTID")="VITAL"_J ; UNIQUE OBJID FOR VITAL
     
    158158          . . . ; W "FIRST ONE",!
    159159          . . . D CP^GPLXPATH(VITARYTMP,VITOUTXML)
    160           . . . ; W "OUTXML ",OUTXML,!
     160          . . . W "VITOUTXML ",VITOUTXML,!
    161161          . . I J>1 D  ; AFTER THE FIRST, INSERT INNER XML
    162162          . . . D INSINNER^GPLXPATH(VITOUTXML,VITARYTMP)
    163163          ; ZWR ^TMP($J,"VITALS",*)
    164           ; ZWR ^TMP($J,"VITALARYTMP",*) ; SHOW THE RESULTS
    165           ; ZWR @OUTXML
     164          ZWR ^TMP($J,"VITALARYTMP",*) ; SHOW THE RESULTS
     165          D PARY^GPLXPATH(VITOUTXML)
    166166          N VITTMP,I
    167167          D MISSING^GPLXPATH(VITOUTXML,"VITTMP") ; SEARCH XML FOR MISSING VARS
  • ccr/trunk/p/GPLXPATH.m

    r60 r74  
    332332         Q
    333333         ;
    334 MAP(IXML,INARY,OXML)    ; SUBSTITUTE @@X@@ VARS IN IXML WITH VALUES IN INARY
     334MAPOLD(IXML,INARY,OXML)    ; SUBSTITUTE @@X@@ VARS IN IXML WITH VALUES IN INARY
    335335     ; AND PUT THE RESULTS IN OXML
    336336         I '$D(@IXML@(0)) W "MALFORMED XML PASSED TO MAP",! Q
     
    345345         . . . S TVAL=@INARY@(TNAM) ; PULL OUT MAPPED VALUE
    346346         . . . S @OXML@(I)=$P(@OXML@(I),"@@",1)_TVAL_$P(@OXML@(I),"@@",3)
     347         W "MAPPED",!
     348         Q
     349         ;
     350MAP(IXML,INARY,OXML)    ; SUBSTITUTE MULTIPLE @@X@@ VARS WITH VALUES IN INARY
     351     ; AND PUT THE RESULTS IN OXML
     352         I '$D(@IXML@(0)) W "MALFORMED XML PASSED TO MAP",! Q
     353         I $O(@INARY@(""))="" W "EMPTY ARRAY PASSED TO MAP",! Q
     354         N I,J,TNAM,TVAL,TSTR
     355         S @OXML@(0)=@IXML@(0) ; TOTAL LINES IN OUTPUT
     356         F I=1:1:@OXML@(0)  D   ; LOOP THROUGH WHOLE ARRAY
     357         . S @OXML@(I)=@IXML@(I) ; COPY THE LINE TO OUTPUT
     358         . I @OXML@(I)?.E1"@@".E D  ; IS THERE A VARIABLE HERE?
     359         . . S TSTR=$P(@IXML@(I),"@@",1) ; INIT TO PART BEFORE VARS
     360         . . F J=2:2:10  D  Q:$P(@IXML@(I),"@@",J+2)="" ; QUIT IF NO MORE VARS
     361         . . . W "IN MAPPING LOOP: ",TSTR,!
     362         . . . S TNAM=$P(@OXML@(I),"@@",J) ; EXTRACT THE VARIABLE NAME
     363         . . . S TVAL="" ; DEFAULT FOR UNMAPPED VARIABLES
     364         . . . I $D(@INARY@(TNAM))  D  ; IS THE VARIABLE IN THE MAP?
     365         . . . . S TVAL=@INARY@(TNAM) ; PULL OUT MAPPED VALUE
     366         . . . S TSTR=TSTR_TVAL_$P(@IXML@(I),"@@",J+1) ; ADD VAR AND PART AFTER
     367         . . S @OXML@(I)=TSTR ; COPY LINE WITH MAPPED VALUES
     368         . . W TSTR
    347369         W "MAPPED",!
    348370         Q
     
    504526 ;;>>>D MAP^GPLXPATH("GXML",MAPARY,OUTARY)
    505527 ;;>>?@OUTARY@(6)="VALUE2"
     528 ;;><MAP2>
     529 ;;>>>D ZTEST^GPLXPATH("INITXML")
     530 ;;>>>S MAPARY="^TMP($J,""MAPVALUES"")"
     531 ;;>>>S OUTARY="^TMP($J,""MAPTEST"")"
     532 ;;>>>S @MAPARY@("DATA1")="VALUE1"
     533 ;;>>>S @MAPARY@("DATA2")="VALUE2"
     534 ;;>>>S @MAPARY@("DATA3")="VALUE3"
     535 ;;>>>S GXML(4)="<FOURTH>@@DATA1@@ AND @@DATA3@@</FOURTH>"
     536 ;;>>>D MAP^GPLXPATH("GXML",MAPARY,OUTARY)
     537 ;;>>>D PARY^GPLXPATH(OUTARY)
     538 ;;>>?@OUTARY@(4)="<FOURTH>VALUE1 AND VALUE3</FOURTH>"
    506539 ;;><QUEUE>
    507540 ;;>>>D QUEUE^GPLXPATH("BTLIST","GXML",2,3)
Note: See TracChangeset for help on using the changeset viewer.