source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWPFSS2.m@ 1716

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1ORWPFSS2 ;SLC-GDU CPRS HL7 PROCESSING FOR RAD PRE-CERT;[04/15/05 09:19]; 4/28/05 15:34
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**228**;Dec 17, 1997
3 ;Routine to process the HL7 message from the Ancillary Radiology
4 ;package for the Pre-Certification Account Reference to be associated
5 ;with the radiology order record in the Order File, file # 100.
6 ;External Variables, set by the HL7 processing
7 ; ORIFN - 1st piece of 3rd piece of ORC message segment, Order IEN
8 ; ORMSG - The HL7 message being processed
9 ; PV1 - PV1 segment number in the HL7 message
10 ;Internal Variables
11 ; ORAR - Order PFSS Account Reference
12 ; ORFDA - Fileman Data Array
13 ; OREM - Error Message
14 ; ORIEN - Order Internal Entry Number
15 ; ORRPAR - Order Radiology Pre-Certification Account Reference
16 ; ORUPDT - Order Update Indicator
17 ; ORPFSS - PFSS Active Indicator
18 ;DBIA References
19 ; $$GET1^DIQ - DBIA 2056
20 ; PFSSACTV^ORWPFSS - Internal to CPRS PFSS
21 ; $$ACCTREF^ORWPFSS1 - Internal to CPRS PFSS
22PRECERT ;Process Radiology HL7 message for precertification PFSS Account
23 ;Reference.
24 N ORAR,ORFDA,OREM,ORIEN,ORRPAR,ORUPDT,ORPFSS
25 ;If PFSS inactive quit
26 D PFSSACTV^ORWPFSS(.ORPFSS) I ORPFSS=0 Q
27 ;If PV1 is null quit
28 I PV1="" Q
29 ;If pre-cert not present in HL7 PV1 seg quit
30 S ORRPAR=$P(@ORMSG@(PV1),"|",51)
31 I ORRPAR="" Q
32 ;If PFSS AR already on file with order quit
33 S ORIEN=+ORIFN
34 S ORAR=$$GET1^DIQ(100,ORIEN,97)
35 I ORAR'="" Q
36 ;Update order with pre-cert PFSS AR
37 S ORUPDT=$$ACCTREF^ORWPFSS1(ORIEN,ORRPAR)
38 I ORUPDT=1 Q
39 ;Return error message is error happens during update
40 S ORERR=$P(ORUPDT,U,2)
41 Q
Note: See TracBrowser for help on using the repository browser.