source: WorldVistAEHR/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXCAVST1.m@ 1742

Last change on this file since 1742 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.8 KB
Line 
1PXCAVST1 ;ISL/dee & LEA/Chylton - Translates data from the PCE Device Interface into PCE's PXK format for the Visit and Providers ;8/1/96
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**73,74,111,121,130**;Aug 12, 1996
3 Q
4 ;
5VST(PXCAENC) ;Visit
6 N PXCAFTER
7NODE0 ;
81 S PXCAFTER=$P(PXCAENC,"^",1)_"^^^^"
95 S PXCAFTER=PXCAFTER_PXCAPAT_"^^^"
108 S PXCAFTER=PXCAFTER_PXCACSTP_"^^^^^^^^^"
1117 ;Store the Evaluation and Management Code in V-CPT and NOT in the Visit
12 D EVALCODE($P(PXCAENC,"^",5),$P(PXCAENC,"^",4))
13 S PXCAFTER=PXCAFTER_"^"
1418 S PXCAFTER=PXCAFTER_$P(PXCAENC,"^",14)_"^^^"
1521 I $P(PXCAENC,"^",13)]"" S PXCAFTER=PXCAFTER_$P(PXCAENC,"^",13)_"^"
16 E D
17 . N PXCAELIG
18 . S PXCAELIG=$$ELIGIBIL^PXCEVSIT(PXCAPAT,PXCAHLOC,+PXCAENC)
19 . S PXCAELIG=$S(PXCAELIG>0:PXCAELIG,1:"")
20 . S PXCAFTER=PXCAFTER_PXCAELIG_"^"
2122 S PXCAFTER=PXCAFTER_PXCAHLOC
22 S ^TMP(PXCAGLB,$J,"VST",1,0,"AFTER")=PXCAFTER
23 ;
24NODE150 I $P($G(^SC(+PXCAHLOC,0)),"^",7)=PXCACSTP D
25 . S ^TMP(PXCAGLB,$J,"VST",1,150,"AFTER")="^^P"
26 ;
27NODE800 ;
28 S ^TMP(PXCAGLB,$J,"VST",1,800,"AFTER")=$P(PXCAENC,"^",6,10)_"^"_$P(PXCAENC,"^",17,18)
29 ;
30 I PXCAVSIT'>0 D
31 . S ^TMP(PXCAGLB,$J,"VST",1,"IEN")=""
32 . S ^TMP(PXCAGLB,$J,"VST",1,0,"BEFORE")=""
33 . S ^TMP(PXCAGLB,$J,"VST",1,150,"BEFORE")=""
34 . S ^TMP(PXCAGLB,$J,"VST",1,800,"BEFORE")=""
35 . S ^TMP(PXCAGLB,$J,"VST",1,812,"BEFORE")=""
36 . S ^TMP(PXCAGLB,$J,"VST",1,812,"AFTER")="^"_PXCAPKG_"^"_PXCASOR
37 E D
38 . S ^TMP(PXCAGLB,$J,"VST",1,"IEN")=PXCAVSIT
39 . S ^TMP(PXCAGLB,$J,"VST",1,0,"BEFORE")=$G(^AUPNVSIT(PXCAVSIT,0))
40 . S $P(^TMP("PXK",$J,"VST",1,0,"AFTER"),"^",3)=$P(^AUPNVSIT(PXCAVSIT,0),"^",3)
41 . S $P(^TMP("PXK",$J,"VST",1,0,"AFTER"),"^",7)=$P(^AUPNVSIT(PXCAVSIT,0),"^",7)
42 . S ^TMP(PXCAGLB,$J,"VST",1,150,"BEFORE")=$G(^AUPNVSIT(PXCAVSIT,150))
43 . S ^TMP(PXCAGLB,$J,"VST",1,800,"BEFORE")=$G(^AUPNVSIT(PXCAVSIT,800))
44 . S ^TMP(PXCAGLB,$J,"VST",1,21,"BEFORE")=$G(^AUPNVSIT(PXCAVSIT,21))
45 . S ^TMP(PXCAGLB,$J,"VST",1,21,"AFTER")=$G(^AUPNVSIT(PXCAVSIT,21))
46 . S ^TMP(PXCAGLB,$J,"VST",1,811,"BEFORE")=$G(^AUPNVSIT(PXCAVSIT,811))
47 . S ^TMP(PXCAGLB,$J,"VST",1,811,"AFTER")=$G(^AUPNVSIT(PXCAVSIT,811))
48 . S ^TMP(PXCAGLB,$J,"VST",1,812,"BEFORE")=$G(^AUPNVSIT(PXCAVSIT,812))
49 . S ^TMP(PXCAGLB,$J,"VST",1,812,"AFTER")=$G(^AUPNVSIT(PXCAVSIT,812))
50 Q
51 ;
52EVALCODE(CODE,PROV) ;Store the Evaluation and Management Code in a CPT node.
53 ;Evaluation and Management Code always has a sequence number of 1
54 ; and there is only one of them.
55 Q:'CODE
56 N PXCAFTER,PXCAITEM,PXCAPNAR,PXCACNAR,PXCACNT,PXCAMOD,PXCASTR
57 N DIC,DR,DA,DIQ,PXCADIQ1
58 S DIC=357.69
59 S DR=".015;.02;.03"
60 S DA=+CODE
61 S DIQ="PXCADIQ1("
62 S DIQ(0)="E"
63 D EN^DIQ1
64 S PXCAITEM=$S($G(PXCADIQ1(357.69,DA,.03,"E"))]"":PXCADIQ1(357.69,DA,.03,"E"),$G(PXCADIQ1(357.69,DA,.015,"E"))]"":PXCADIQ1(357.69,DA,.015,"E"),1:"UNKNOWN")
65 S PXCAPNAR=+$$PROVNARR^PXAPI(PXCAITEM,9000010.18)
66 I PXCAPNAR'>0 S PXCAPNAR=""
67 S ^TMP(PXCAGLB,$J,"CPT",1,0,"BEFORE")=""
68 S PXCAFTER=CODE_"^"_PXCAPAT_"^"_PXCAVSIT_"^"
69 S PXCAFTER=PXCAFTER_PXCAPNAR
70 S PXCAFTER=PXCAFTER_"^^^^^^^^^^^^1"
71 S ^TMP(PXCAGLB,$J,"CPT",1,0,"AFTER")=PXCAFTER
72 ; File modifiers in ^TMP global
73 S ^TMP(PXCAGLB,$J,"CPT",1,1,1,"BEFORE")=""
74 S (PXCACNT,PXCAMOD)=""
75 F PXCACNT=1:1 S PXCAMOD=$O(PXCA("ENCOUNTER","MODIFIER",PXCAMOD)) Q:PXCAMOD="" D
76 . S PXCASTR=$$MODP^ICPTMOD(CODE,PXCAMOD,"E",PXCADT)
77 . Q:+PXCASTR<1
78 . S ^TMP(PXCAGLB,$J,"CPT",1,1,PXCACNT,"AFTER")=+PXCASTR
79 S ^TMP(PXCAGLB,$J,"CPT",1,12,"BEFORE")=""
80 I PROV S ^TMP(PXCAGLB,$J,"CPT",1,12,"AFTER")="^^^"_PROV
81 E S ^TMP(PXCAGLB,$J,"CPT",1,12,"AFTER")=""
82 S ^TMP(PXCAGLB,$J,"CPT",1,802,"BEFORE")=""
83 S ^TMP(PXCAGLB,$J,"CPT",1,812,"BEFORE")=""
84 S ^TMP(PXCAGLB,$J,"CPT",1,812,"AFTER")="^"_PXCAPKG_"^"_PXCASOR
85 S PXCACNAR=""
86 I $G(PXCADIQ1(357.69,DA,.02,"E"))]"" D
87 . S PXCACNAR=+$$PROVNARR^PXAPI(PXCADIQ1(357.69,DA,.02,"E"),9000010.18)
88 . I PXCACNAR'>0 S PXCACNAR=""
89 S ^TMP(PXCAGLB,$J,"CPT",1,802,"AFTER")=PXCACNAR
90 S ^TMP(PXCAGLB,$J,"CPT",1,"IEN")=""
91 Q
92 ;
Note: See TracBrowser for help on using the repository browser.