source: WorldVistAEHR/trunk/r/INCIDENT_REPORTING-QAN/QANUTL7.m@ 1579

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

initial load of WorldVistAEHR

File size: 1.5 KB
RevLine 
[613]1QANUTL7 ;HISC/GJC-SPECIAL INCIDENTS INVOL. A BENEFICIARY ;3/8/92
2 ;;2.0;Incident Reporting;;08/07/1992
3 ;
4EN1 ;Format of the print for our Patient/Incident Inquiry
5 F QANW=0:0 S QANW=$O(^UTILITY("DIQ1",$J,QANW)) Q:QANW'>0 D CHECK Q:QANQUIT
6 Q
7CHECK ;Check for multiples.
8 I QANW=742.01!(QANW=742.02)!(QANW=742.42) D MULT Q
9 F QANX=0:0 S QANX=$O(^UTILITY("DIQ1",$J,QANW,QANX)) Q:QANX'>0!(QANQUIT) F QANY=0:0 S QANY=$O(^UTILITY("DIQ1",$J,QANW,QANX,QANY)) Q:QANY'>0 D CHEX Q:QANQUIT
10 Q
11CHEX ;Check for word processing fields
12 I QANW=742.4,(QANY=.05!(QANY=.2)) D WORD Q
13 S QANDD=$G(^DD(QANW,QANY,0)) Q:QANDD']""
14 S QANUTIL=$G(^UTILITY("DIQ1",$J,QANW,QANX,QANY,"E"))
15 W !,$P(QANDD,U)_": "_$P(QANUTIL,U)
16 D:$Y>(IOSL-4) HDH
17 Q
18HDH ;Header for our data inquiry.
19 I $E(IOST)="C" K DIR S DIR(0)="E" D ^DIR K DIR S:+Y=0 QANQUIT=1
20 Q:QANQUIT D HDR^QANUTL6
21 Q
22MULT ;Text for multiples
23 F QANX=0:0 S QANX=$O(^UTILITY("DIQ1",$J,QANW,QANX)) Q:QANX'>0!(QANQUIT) F QANY=0:0 S QANY=$O(^UTILITY("DIQ1",$J,QANW,QANX,QANY)) Q:QANY'>0 D MULT1 Q:QANQUIT
24 Q
25MULT1 ;Data inquiry.
26 S QANDD=$G(^DD(QANW,QANY,0)) Q:QANDD']""
27 S QANUTIL=$G(^UTILITY("DIQ1",$J,QANW,QANX,QANY,"E"))
28 W !,$P(QANDD,U)_" ("_QANX_") "_$P(QANUTIL,U)
29 D:$Y>(IOSL-4) HDH Q:QANQUIT
30 Q
31WORD ;Output for word processing.
32 S QANDD=$G(^DD(QANW,QANY,0)) Q:QANDD']""
33 W !,$P(QANDD,U)_": "
34 F QANZ=0:0 S QANZ=$O(^UTILITY("DIQ1",$J,QANW,QANX,QANY,QANZ)) Q:QANZ'>0!(QANQUIT) W !,QANZ_": "_^UTILITY("DIQ1",$J,QANW,QANX,QANY,QANZ) D:$Y>(IOSL-4) HDH Q:QANQUIT
35 Q
Note: See TracBrowser for help on using the repository browser.