source: ccr/trunk/p/GPLCCR0.m@ 52

Last change on this file since 52 was 48, checked in by Sam Habiel, 16 years ago

Added entry points to GPLACTORS to get the patient information; changes in Template in GPLCCR0

File size: 13.9 KB
RevLine 
[40]1GPLCCR0 ; CCDCCR/GPL - CCR TEMPLATE AND ACCESS ROUTINES; 5/31/08
2 ;;0.1;CCDCCR;nopatch;noreleasedate
3 W "This is a CCR TEMPLATE with processing routines",!
4 W !
5 Q
6 ;
[42]7ZT(ZARY,BAT,LINE) ; private routine to add a line to the ZARY array
[40]8 ; ZARY IS PASSED BY NAME
9 ; BAT is a string identifying the section
10 ; LINE is a test which will evaluate to true or false
11 ; I '$G(@ZARY) D
12 . S @ZARY@(0)=0 ; initially there are no elements
13 . W "GOT HERE LOADING "_LINE,!
14 N CNT ; count of array elements
15 S CNT=@ZARY@(0) ; contains array count
16 S CNT=CNT+1 ; increment count
17 S @ZARY@(CNT)=LINE ; put the line in the array
18 ; S @ZARY@(BAT,CNT)="" ; index the test by battery
19 S @ZARY@(0)=CNT ; update the array counter
20 Q
21 ;
[42]22ZLOAD(ZARY,ROUTINE) ; load tests into ZARY which is passed by reference
[40]23 ; ZARY IS PASSED BY NAME
24 ; ZARY = name of the root, closed array format (e.g., "^TMP($J)")
25 ; ROUTINE = NAME OF THE ROUTINE - PASSED BY VALUE
26 K @ZARY S @ZARY=""
27 S @ZARY@(0)=0 ; initialize array count
28 N LINE,LABEL,BODY
29 N INTEST S INTEST=0 ; switch for in the TEMPLATE section
30 N SECTION S SECTION="[anonymous]" ; NO section LABEL
31 ;
32 N NUM F NUM=1:1 S LINE=$T(+NUM^@ROUTINE) Q:LINE="" D
33 . I LINE?." "1";<TEMPLATE>".E S INTEST=1 ; entering section
34 . I LINE?." "1";</TEMPLATE>".E S INTEST=0 ; leaving section
35 . I INTEST D ; within the section
36 . . I LINE?." "1";><".E D ; sub-section name found
37 . . . S SECTION=$P($P(LINE,";><",2),">",1) ; pull out name
38 . . I LINE?." "1";;".E D ; line found
39 . . . D ZT(ZARY,SECTION,$P(LINE,";;",2)) ; put the line in the array
40 Q
41 ;
[42]42LOAD(ARY) ; LOAD A CCR TEMPLATE INTO ARY PASSED BY NAME
[40]43 D ZLOAD(ARY,"GPLCCR0")
44 ; ZWR @ARY
45 Q
46 ;
[36]47;<TEMPLATE>
[42]48;;<?xml version="1.0" encoding="UTF-8"?>
[36]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>
[42]424;;<ACTOR-PATIENT>
[36]425;;<Actor>
426;;<ActorObjectID>@@ACTOROBJECTID@@</ActorObjectID>
427;;<Person>
428;;<Name>
429;;<CurrentName>
430;;<Given>@@ACTORGIVENNAME@@</Given>
431;;<Middle>@@ACTORMIDDLENAME@@</Middle>
432;;<Family>@@ACTORFAMILYNAME@@</Family>
433;;</CurrentName>
434;;</Name>
435;;<DateOfBirth>
436;;<ExactDateTime>@@ACTORDATEOFBIRTH@@</ExactDateTime>
437;;</DateOfBirth>
438;;<Gender>
[48]439;;<Code>
[36]440;;<Text>@@ACTORGENDER@@</Text>
[48]441;;<Value>@@ACTORGENDER@@</Value>
442;;<CodingSystem>2.16.840.1.113883.5.1</CodingSystem>
443;;</Code>
[36]444;;</Gender>
445;;</Person>
446;;<IDs>
447;;<Type>
448;;<Text>SSN</Text>
449;;</Type>
450;;<ID>@@ACTORSSN@@</ID>
451;;<Source>
452;;<Actor>
453;;<ActorID>@@ACTORSSNSOURCEID@@</ActorID>
454;;</Actor>
455;;</Source>
456;;</IDs>
457;;<Address>
458;;<Type>
459;;<Text>@@ACTORADDRESSTYPE@@</Text>
460;;</Type>
461;;<Line1>@@ACTORADDRESSLINE1@@</Line1>
462;;<Line2>@@ACTORADDRESSLINE2@@</Line2>
463;;<City>@@ACTORADDRESSCITY@@</City>
464;;<State>@@ACTORADDRESSSTATE@@</State>
465;;<PostalCode>@@ACTORADDRESSZIPCODE@@</PostalCode>
466;;</Address>
467;;<Telephone>
[48]468;;<Value>@@ACTORRESTEL@@</Value>
[36]469;;<Type>
[48]470;;<Text>Residential Telephone</Text>
[36]471;;</Type>
472;;</Telephone>
[48]473;;<Telephone>
474;;<Value>@@ACTORWORKTEL@@</Value>
475;;<Type>
476;;<Text>Work Telephone</Text>
477;;</Type>
478;;</Telephone>
479;;<Telephone>
480;;<Value>@@ACTORCELLTEL@@</Value>
481;;<Type>
482;;<Text>Cell phone</Text>
483;;</Type>
484;;</Telephone>
[36]485;;<EMail>
486;;<Value>@@ACTOREMAIL@@</Value>
487;;</EMail>
488;;<Source>
489;;<Actor>
490;;<ActorID>@@ACTORADDRESSSOURCEID@@</ActorID>
491;;</Actor>
492;;</Source>
493;;</Actor>
[42]494;;</ACTOR-PATIENT>
495;;<ACTOR-SYSTEM>
[36]496;;<Actor>
497;;<ActorObjectID>@@ACTOROBJECTID@@</ActorObjectID>
498;;<InformationSystem>
499;;<Name>@@ACTORINFOSYSNAME@@</Name>
500;;<Version>@@ACTORINFOSYSVER@@</Version>
501;;</InformationSystem>
502;;<Source>
503;;<Actor>
504;;<ActorID>@@ACTORINFOSYSSOURCEID@@</ActorID>
505;;</Actor>
506;;</Source>
507;;</Actor>
[42]508;;</ACTOR-SYSTEM>
509;;<ACTOR-NOK>
[36]510;;<Actor>
511;;<ActorObjectID>AA0003</ActorObjectID>
512;;<Person>
513;;<Name>
514;;<DisplayName>@@ACTORDISPLAYNAME@@</DisplayName>
515;;</Name>
516;;</Person>
517;;<Relation>
518;;<Text>@@ACTORRELATION@@</Text>
519;;</Relation>
520;;<Source>
521;;<Actor>
522;;<ActorID>@@ACTORRELATIONSOURCEID@@</ActorID>
523;;</Actor>
524;;</Source>
525;;</Actor>
[42]526;;</ACTOR-NOK>
527;;<ACTOR-PROVIDER>
[36]528;;<Actor>
529;;<ActorObjectID>@@ACTOROBJECTID@@</ActorObjectID>
530;;<Person>
531;;<Name>
532;;<CurrentName>
533;;<Given>@@ACTORGIVENNAME@@</Given>
534;;<Family>@@ACTORFAMILYNAME@@</Family>
535;;</CurrentName>
536;;</Name>
537;;</Person>
538;;<Specialty>
539;;<Text>@@ACTORSPECIALITY@@</Text>
540;;</Specialty>
541;;<Address>
542;;<Type>
543;;<Text>@@ACTORADDRESSTYPE@@</Text>
544;;</Type>
545;;<Line1>@@ACTORADDRESSLINE1@@</Line1>
546;;<City>@@ACTORADDRESSLINE2@@</City>
547;;<State>@@ACTORADDRESSSTATE@@</State>
548;;</Address>
549;;<Source>
550;;<Actor>
551;;<ActorID>@@ACTORSOURCEID@@</ActorID>
552;;</Actor>
553;;</Source>
554;;</Actor>
[42]555;;</ACTOR-PROVIDER>
[36]556;;</Actors>
557;;<Signatures>
558;;<CCRSignature>
559;;<SignatureObjectID>S0001</SignatureObjectID>
560;;<ExactDateTime>2008-03-18T23:10:58Z</ExactDateTime>
561;;<Source>
562;;<ActorID>AA0001</ActorID>
563;;</Source>
564;;<Signature>
565;;<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
566;;<SignedInfo>
567;;<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
568;;<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
569;;<Reference URI="">
570;;<Transforms>
571;;<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
572;;</Transforms>
573;;<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
574;;<DigestValue>YFveLLyo+75P7rSciv0/m1O6Ot4=</DigestValue>
575;;</Reference>
576;;</SignedInfo>
577;;<SignatureValue>Bj6sACXl74hrlbUYnu8HqnRab5VGy69BOYjOH7dETxgppXMEd7AoVYaePZvgJft78JR4oQY76hbFyGcIslYauPpJxx2hCd5d56xFeaQg01R6AQOvGnhjlq63TbpFdUq0B4tYsmiibJPbQJhTQe+TcWTBvWaQt8Fkk5blO571YvI=</SignatureValue>
578;;<KeyInfo>
579;;<KeyValue>
580;;<RSAKeyValue>
581;;<Modulus>meH817QYol+/uUEg6j8Mg89s7GTlaN9B+/CGlzrtnQH+swMigZRnEPxHVO8PhEymP/W9nlhAjTScV/CUzA9yJ9WiaOn17c+KReKhfBqL24DX9BpbJ+kLYVz7mBO5Qydk5AzUT2hFwW93irD8iRKP+/t+2Mi2CjNfj8VTjJpHpm0=</Modulus>
582;;<Exponent>AQAB</Exponent>
583;;</RSAKeyValue>
584;;</KeyValue>
585;;</KeyInfo>
586;;</Signature>
587;;</Signature>
588;;</CCRSignature>
589;;</Signatures>
590;;</ContinuityOfCareRecord>
591;</TEMPLATE>
Note: See TracBrowser for help on using the repository browser.