source: WorldVistAEHR/trunk/r/SURGERY-SR/SROESHL.m@ 1375

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

initial load of WorldVistAEHR

File size: 2.1 KB
RevLine 
[613]1SROESHL ;BIR/ADM - E-SIG HL7 UTILITY ; [ 02/06/01 9:28 AM ]
2 ;;3.0; Surgery ;**100**;24 Jun 93
3 ;
4 ;** NOTICE: This routine is part of an implementation of a nationally
5 ;** controlled procedure. Local modifications to this routine
6 ;** are prohibited.
7 ;
8 N SRESARF,SRESNRF S SRESQ=0 I $G(SRESAR) D Q:SRESQ
9 .S SRESARF="58,57,21,111,61,15,14,60,54,29,20,69,22,75,68,92,63,62,52,51,53,47,50,45,42,115,96,18,55,19,40,39,49,43,44,23,65,64"
10 .I SRESARF[IEN D XTMP S SRESQ=1
11 I $G(SRESNR) D
12 .S SRESNRF="58,57,54,20,114,22,31,52,51,53,47,50,115,18,55,40,39,34,113,13,49,7,8,10,12,17,33,36,23,35,37"
13 .I SRESNRF[IEN D XTMP S SRESQ=1
14 Q
15XTMP ; store info for alert in ^XTMP
16 S SRESCNT=SRESCNT+1 I SRESCNT=1 S XQAID="SRESHL_"_CASE,XQAKILL=0 D DELETEA^XQALERT K ^XTMP("SRESHL_"_CASE)
17 I '$D(^XTMP("SRESHL_"_CASE,0)) D
18 .N X,X1,X2 S X1=DT,X2=14 D C^%DTC S ^XTMP("SRESHL_"_CASE,0)=X_"^"_DT_"^Surgery HL7 Transmission Alert"
19 .S ^XTMP("SRESHL_"_CASE,1,1)="The following data elements are contained on an electronically signed report"
20 .S ^XTMP("SRESHL_"_CASE,1,2)="and cannot be uploaded to the surgical record in VistA. These data elements"
21 .S ^XTMP("SRESHL_"_CASE,1,3)="must be entered manually and will require that an addendum be made to the"
22 .S ^XTMP("SRESHL_"_CASE,1,4)="signed report.",^XTMP("SRESHL_"_CASE,1,5)=""
23 .N DFN S DFN=$P(^SRF(CASE,0),"^") D DEM^VADPT
24 .S ^XTMP("SRESHL_"_CASE,1,6)="Patient: "_VADM(1)_" ("_VA("PID")_") - Case #"_CASE,^XTMP("SRESHL_"_CASE,1,7)=""
25 S SRESFLD=$P(^SRO(133.2,IEN,0),"^"),SRESVAL=$$VALUE^SRHLUI(IEN)
26 S ^XTMP("SRESHL_"_CASE,2,IEN)=" "_SRESFLD_" : "_SRESVAL
27ALERT ; send alert to prin. anesthetist and anes. supervisor
28 Q:'$O(^XTMP("SRESHL_"_CASE,0)) N X,Y,Z
29 S XQAID="SRESHL_"_CASE,XQAKILL=0 D DELETEA^XQALERT
30 S Z=$G(^SRF(CASE,.3)),X=$P(Z,"^"),Y=$P(Z,"^",4) Q:X=""&(Y="")
31 S:X XQA(X)="" S:Y XQA(Y)="" S XQAMSG="Cannot upload Surgery data on signed report."
32 S XQAROU="ACTION^SROESHL",XQAID="SRESHL_"_CASE D SETUP^XQALERT
33 Q
34ACTION ; alert action
35 N SRID S SRID=$P(XQAID,";") Q:'$O(^XTMP(SRID,0))
36 W @IOF
37 D EN^DDIOL("","^XTMP(SRID,1)")
38 D EN^DDIOL("","^XTMP(SRID,2)")
39 Q
Note: See TracBrowser for help on using the repository browser.