source: WorldVistAEHR/trunk/r/BAR_CODE_MED_ADMIN-ALPB-PSB/PSBVITFL.m@ 1474

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1PSBVITFL ;BIRMINGHAM/TEJ-BCMA VITAL MEASUREMENT FILER ;Mar 2004
2 ;;3.0;BAR CODE MED ADMIN;*31*;Mar 2004;Build 1
3 ; Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5 ; Reference/IA
6 ; STORE^GMRVPCE0/1589
7 ; 44/908
8 ; 42/10039
9 ;
10 ;
11 ; Description:
12 ; This routine is to service BCMA 3.0 functionality and store VITALs'
13 ; data into the VITAL MEASUREMENT FILE - ^GMR(120.5 using the API
14 ; GMRVPCE0
15 ;
16 ; Parameters:
17 ; Input - DFN (r) Pointer to the PATIENT (#2) file
18 ; RATE (r) BCMA trigger event/transaction
19 ; VTYPE (o) Pointer to GMRV VITAL TYPE FILE (#120.51)
20 ; (default = Pain ["PN"])
21 ; DTTKN (o) Date/time (FileMan) measurment was taken
22 ; (default = $$NOW^XLFDT())
23 ;
24 ; Output - RESULTS(0) = 1
25 ; RESULTS(1) ="1^*** comment ***"
26 ; or RESULTS(1) ="-1^ERROR * Pain Score NOT filed
27 ; successfully"
28 ;
29 ; Process results in the storing of VITAL Measurement rate into the VITAL
30 ; MEASUREMENT FILE per the given patient and vital type.
31 ;
32RPC(RESULTS,PSBDFN,PSBRATE,PSBVTYPE,PSBDTTKN) ;
33 ;
34 ; Set up the input array for the API
35 ;
36 ;PSB*3*31 Quit if patient has been discharged.
37 K VADM,VAIN
38 N DFN S DFN=$G(PSBDFN),VAIP("D")=""
39 D DEM^VADPT,IN5^VADPT
40 S RESULTS(0)=1,RESULTS(1)="-1^ERROR * "_$S($G(PSBVTYPE)']""!($G(PSBVTYPE)="PN"):"Pain Score",1:"Vital Measurement")_" NOT filed successfully."
41 I 'VAIP(13)&('VADM(6)) S RESULTS(1)=RESULTS(1)_" Patient has been DISCHARGED." Q
42 S:$G(PSBVTYPE)']"" PSBVTYPE="PN"
43 S:$G(PSBDTTKN)']"" PSBDTTKN=$$NOW^XLFDT()
44 S PSBHLOC=^DIC(42,+$G(VAIP(5)),44)
45 S GMRVDAT("ENCOUNTER")=U_PSBDFN_U_$G(PSBHLOC)
46 S GMRVDAT("SOURCE")=U_$G(DUZ)
47 S GMRVDAT("VITALS",$G(DUZ),1)=PSBVTYPE_U_$G(PSBRATE)_U_$G(PSBUNTS)_U_PSBDTTKN
48 D STORE^GMRVPCE0(.GMRVDAT)
49 I '$D(GMRVDAT("ERROR")) D NOW^%DTC,YX^%DTC S RESULTS(0)=1,RESULTS(1)="1^"_$S($G(PSBVTYPE)="PN":"Pain Score",1:PSBVTYPE)_" entered in Vitals via BCMA taken "_Y
50 Q
51 ;
Note: See TracBrowser for help on using the repository browser.