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

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1VSITPUT1 ;ISD/RJP - Continued...Verify/set fields and file visit record ;6/20/96
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**76**;Aug 12, 1996
3 ; Patch PX*1*76 changes the 2nd line of all VSIT* routines to reflect
4 ; the incorporation of the module into PCE. For historical reference,
5 ; the old (VISIT TRACKING) 2nd line is included below to reference VSIT
6 ; patches.
7 ;
8 ;;2.0;VISIT TRACKING;**3**;Aug 12, 1996;
9 ;
10 ;Routine called by ^VSITPUT
11 K DD,DO,DA,DIC,DIK,X,Y,DLAYGO
12 L +^XTMP("VSIT CREATE",+$G(VSIT("PAT")),+VSIT("VDT")):0 Q:'$T
13 D:+$G(DINUM)
14 . S DLAYGO=9000010
15 . S DIC="^AUPNVSIT("
16 . S DIC(0)=""
17 . S X=+VSIT("VDT")
18 . D FILE^DICN
19 . L:+Y>0 +^AUPNVSIT(+Y)
20 . K DLAYGO,DIC,DD,DO,X
21 D:'+$G(DINUM)
22 . N VSITI
23 . S VSITI=$P(^AUPNVSIT(0),"^",3)
24 . F S VSITI=VSITI+1 L +^AUPNVSIT(VSITI):1 Q:$T&'$D(^AUPNVSIT(VSITI)) L -^AUPNVSIT(VSITI)
25 . S ^AUPNVSIT(VSITI,0)=VSIT("VDT")
26 . S ^AUPNVSIT("B",VSIT("VDT"),VSITI)=""
27 . L +^AUPNVSIT(0)
28 . S ^AUPNVSIT(0)=$P(^AUPNVSIT(0),"^",1,2)_"^"_VSITI_"^"_($P(^(0),"^",4)+1)
29 . L -^AUPNVSIT(0)
30 . L:VSITI'>0 -^AUPNVSIT(VSITI)
31 . S Y=VSITI_"^"_VSIT("VDT")_"^1"
32 D:Y>0
33 . S VSIT("IEN")=Y
34 . S $P(^AUPNVSIT(+Y,0),"^",2,99)=$P(VSITREC(0),"^",2,99)
35 . S:$G(VSITREC(21))]"" ^AUPNVSIT(+Y,21)=VSITREC(21)
36 . S:$G(VSITREC(150))]"" ^AUPNVSIT(+Y,150)=VSITREC(150)
37 . S:$G(VSITREC(800))]"" ^AUPNVSIT(+Y,800)=VSITREC(800)
38 . S:$G(VSITREC(811))]"" ^AUPNVSIT(+Y,811)=VSITREC(811)
39 . S:$G(VSITREC(812))]"" ^AUPNVSIT(+Y,812)=VSITREC(812)
40 . S DA=+Y,DIK="^AUPNVSIT(" D IX1^DIK K DIK
41 . L -^AUPNVSIT(DA)
42 L -^XTMP("VSIT CREATE",+$G(VSIT("PAT")),+VSIT("VDT"))
43 K DD,DO,DA,DIC,DIK,X,Y,DLAYGO
44 Q
Note: See TracBrowser for help on using the repository browser.