source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSJMP.m@ 1801

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1PSJMP ;BIR/CML3-PATIENT LOOK-UP ;12 JAN 94 / 2:00 PM
2 ;;5.0; INPATIENT MEDICATIONS ;**53,111**;16 DEC 97
3 ;
4 ; Reference to ^VADPT is supported by DBIA 10061
5 ;
6ENDPT ;*** get patient ***
7 K DIC,PSGP,Y W !!,"Select "_$S($D(PSGDICA):PSGDICA_" ",1:"")_"PATIENT: " R X:DTIME I "^"[X S (Y,PSGP)=-1 G DONE
8 D EN^PSJDPT
9 I Y'>0 G ENDPT
10 K DIC
11 ;
12CHK ;*** Check patient status ***
13 S PPN=$P(Y,U,2),(DFN,PSGP)=+Y,VA200=1 D INP^VADPT
14 I VAIN(4) S PSJPWD=+VAIN(4) G DONE
15 ;S PSJPCAF="",VAIP("D")="L" D IN5^VADPT I 'VAIP(13,1) W $C(7),!!?3,"PATIENT HAS NEVER BEEN ADMITTED." G ENDPT
16 S PSJPCAF="",VAIP("D")="L" D IN5^VADPT I 'VAIP(13,1) W $C(7),!!?3,"PATIENT HAS NEVER BEEN ADMITTED." G:'$$CONT ENDPT S PSJPWD="OTHER"
17 ;S PSJPAD=VAIP(13,1),PSGID=+VAIP(3),X=+VAIP(4)=12!(+VAIP(4)=38),PSGOD=$$ENDTC^PSGMI(PSGID) W $C(7),!!?3,"PATIENT IS FOUND TO BE D",$P("ISCHARG^ECEAS",U,X+1),"ED AS OF ",PSGOD,"." G:'$D(PSGRETF) ENDPT
18 S PSJPAD=VAIP(13,1),PSGID=+VAIP(3),X=+VAIP(4)=12!(+VAIP(4)=38),PSGOD=$$ENDTC^PSGMI(PSGID) D G:'$$CONT ENDPT S PSJPWD="OTHER"
19 . W $C(7),!!?3,"PATIENT IS FOUND TO BE D",$P("ISCHARG^ECEAS",U,X+1),"ED AS OF ",PSGOD,"."
20 ;
21DONE ;
22 K DA,DIC,NB,ND,NS,PSGID,PSGOD,VA200,VADM,VAIN,VAIP,VAMT,X,Y(0),Y(0,0) Q
23 ;
24CONT() ;
25 K DIR S DIR("?")="A 'YES' or 'NO' response is required" W !
26 S DIR(0)="Y",DIR("A")="Do you wish to continue with this patient" D ^DIR
27 Q Y
Note: See TracBrowser for help on using the repository browser.