source: WorldVistAEHR/trunk/r/ASISTS-OOPS/OOPSGUIU.m@ 1073

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1OOPSGUIU ;WIOFO/LLH-RPC Broker calls for GUI ;03/25/04
2 ;;2.0;ASISTS;**11**;Jun 03, 2002
3 ;
4SERVICE ; calling this Service report but it really is Location
5 ; of injury and detail location of injury report
6 ; Note: to sort this report by station, add DSTXT as the first
7 ; subscript in ARR
8 N DLOC,DLSTAIEN,DLOCTX,DS,DSTXT,LOC,LOCTX,TI
9 S LOC=$$GET1^DIQ(2260,IEN,27,"I"),LOCTX=$$GET1^DIQ(2260,IEN,27)
10 S DLOC=$$GET1^DIQ(2260,IEN,348),DS=$$GET1^DIQ(2260,IEN,13,"I")
11 S DSTXT=$$GET1^DIQ(2260,IEN,13)
12 S TI=$$GET1^DIQ(2260,IEN,3)
13 I ($G(TI)="") Q
14 I $G(LOCTX)="" S LOCTX="No Location Text,Loc Code ="_LOC
15 I LOC="" S ARR(TI,"NO LOC ENTERED"," - ")=$G(ARR(TI,"NO LOC ENTERED"," - "),0)+1 Q
16 I DLOC="" S ARR(TI,LOCTX,"NO DETAIL ENTERED")=$G(ARR(TI,LOCTX,"NO DETAIL ENTERED"),0)+1 Q
17 I DLOC'="" D
18 .S DLSTAIEN=$O(^OOPS(2261.4,LOC,1,"B",DS,""))
19 .I DLSTAIEN="" S ARR(TI,LOCTX,"STADET NO ENT")=$G(ARR(TI,LOCTX,"STADET NO ENT"),0)+1
20 .S DLOCTX=$G(^OOPS(2261.4,LOC,1,DLSTAIEN,1,DLOC,0),"BAD DATA")
21 .S ARR(TI,LOCTX,DLOCTX)=$G(ARR(TI,LOCTX,DLOCTX),0)+1
22 Q
23CMPLSRV ; move data from ARR to ^TMP($J,"SERVICE"
24 N N1,N2,N3,N4,CN
25 S CN=0,N1=""
26 F S N1=$O(ARR(N1)) Q:N1="" S N2="" D
27 .F S N2=$O(ARR(N1,N2)) Q:N2="" S N3="" D
28 ..F S N3=$O(ARR(N1,N2,N3)) Q:N3="" S N4="" D
29 ...;add line below back in if sorting by station
30 ...;F S N4=$O(ARR(N1,N2,N3,N4)) Q:N4="" D
31 ...S ^TMP($J,TAG,CN)=N1_U_N2_U_N3_U_N4_U_ARR(N1,N2,N3),CN=CN+1
32 Q
33DSPUTE ; from OOPSGUIR, set temp global from compiled data
34 ; this should only be called from DSPUTE^OOPSGUIR
35 N IEN,CN,FI,LT,NLT
36 S IEN=0 F S IEN=$O(^OOPS(2262.8,IEN)) Q:(IEN'>0) D
37 .S FI=$P($G(^OOPS(2262.8,IEN,0)),U) I '$D(ARR(FI)) S ARR(FI,"NLT")=0
38 S FI="",CN=1
39 F S FI=$O(ARR(FI)) Q:FI="" D
40 .S LT=$G(ARR(FI,"LT"),0),NLT=$G(ARR(FI,"NLT"),0)
41 .S ^TMP($J,TAG,CN)=FI_U_LT_U_NLT,CN=CN+1
42 Q
Note: See TracBrowser for help on using the repository browser.