- HMPXGORD ; ASMR/hrubovcak - ORDER file (#100) data retrieval ;Nov 03, 2015 18:23:03
- ;;2.0;ENTERPRISE HEALTH MANAGEMENT PLATFORM;**2**;Sep 01, 2011;Build 28
- ;Per VA Directive 6402, this routine should not be modified.
- ;
- Q
- ;
- TOP(HMPRSLT,HMPORIEN,HMPFLDS,HMPFLG) ; return top-level fields
- ; HMPRSLT - result array, closed reference, required
- ; HMPORIEN - IEN of NEW PERSON, required
- ; HMPFLDS - field list, required, FileMan convention
- ; HMPFLG - data flag, optional, FileMan convention
- ;
- Q:'$L($G(HMPRSLT))
- ;
- K @HMPRSLT ; clear all results
- ; error data is found in -1 subscript
- I '($G(HMPORIEN)>0) S @HMPRSLT@(-1,$T(+0))="ORDER IEN required" Q
- I $G(HMPFLDS)="" S @HMPRSLT@(-1,$T(+0))="ORDER fields required" Q
- I '$L($G(HMPFLG)) N HMPFLG S HMPFLG="EIN" ; default is external and internal, skip nulls
- N DA,DIC,DIQ,DR,FLAGS ; FileMan variables
- S DIC=100,DR=HMPFLDS,DA=HMPORIEN,DIQ=HMPRSLT,DIQ(0)=HMPFLG,FLAGS=HMPFLG
- D EN^DIQ1
- Q
- ;
- DIALOG(HMPORIEN) ; function, return (#2) DIALOG [5V] for ORDER
- Q $P($G(^OR(100,+$G(HMPORIEN),0)),"^",5)
- ;
- ORDTOP(HMPORDFL,HMPORDIEN,HMPORDND) ; function, return top-level node from a file in ^ORD (file list below)
- ;
- I '($G(HMPORDFL)>0)!'($G(HMPORDIEN)>0)!'$L($G(HMPORDND)) Q "" ; all required
- ;
- Q $G(^ORD(HMPORDFL,HMPORDIEN,HMPORDND)) ; returns internal format
- ;
- ;
- ; files in the ^ORD global:
- ;
- ;ORDER STATUS (#100.01)
- ;NATURE OF ORDER (#100.02)
- ;ORDER REASON (#100.03)
- ;ORDER CHECK INSTANCES (#100.05)
- ;OE/RR PRINT FIELDS (#100.22)
- ;OE/RR PRINT FORMATS (#100.23)
- ;OE/RR RELEASE EVENTS (#100.5)
- ;OE/RR AUTO-DC RULES (#100.6)
- ;OE/RR EPCS PARAMETERS (#100.7)
- ;ORDER CHECKS (#100.8)
- ;OE/RR NOTIFICATIONS (#100.9)
- ;DISPLAY GROUP (#100.98)
- ;ORDER PARAMETERS (#100.99)
- ;PROTOCOL (#101)
- ;OR CPRS TABS (#101.13)
- ;OE/RR COM OBJECTS (#101.15)
- ;OE/RR REPORT (#101.24)
- ;ORDER EXECUTE CODES (#101.3)
- ;ORDER DIALOG (#101.41)
- ;ORDER URGENCY (#101.42)
- ;ORDERABLE ITEMS (#101.43)
- ;ORDER QUICK VIEW (#101.44)
- ;CPRS QUERY DEFINITION (#102.21)
- ;CPRS QUERY CONSTRAINT (#102.22)
- ;CPRS QUERY EDIT CONTROL (#102.23)
- ;CPRS QUERY DISPLAY FIELDS (#102.24)
- ;
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HHMPXGORD 2184 printed Mar 13, 2025@20:59:31 Page 2
- HMPXGORD ; ASMR/hrubovcak - ORDER file (#100) data retrieval ;Nov 03, 2015 18:23:03
- +1 ;;2.0;ENTERPRISE HEALTH MANAGEMENT PLATFORM;**2**;Sep 01, 2011;Build 28
- +2 ;Per VA Directive 6402, this routine should not be modified.
- +3 ;
- +4 QUIT
- +5 ;
- TOP(HMPRSLT,HMPORIEN,HMPFLDS,HMPFLG) ; return top-level fields
- +1 ; HMPRSLT - result array, closed reference, required
- +2 ; HMPORIEN - IEN of NEW PERSON, required
- +3 ; HMPFLDS - field list, required, FileMan convention
- +4 ; HMPFLG - data flag, optional, FileMan convention
- +5 ;
- +6 if '$LENGTH($GET(HMPRSLT))
- QUIT
- +7 ;
- +8 ; clear all results
- KILL @HMPRSLT
- +9 ; error data is found in -1 subscript
- +10 IF '($GET(HMPORIEN)>0)
- SET @HMPRSLT@(-1,$TEXT(+0))="ORDER IEN required"
- QUIT
- +11 IF $GET(HMPFLDS)=""
- SET @HMPRSLT@(-1,$TEXT(+0))="ORDER fields required"
- QUIT
- +12 ; default is external and internal, skip nulls
- IF '$LENGTH($GET(HMPFLG))
- NEW HMPFLG
- SET HMPFLG="EIN"
- +13 ; FileMan variables
- NEW DA,DIC,DIQ,DR,FLAGS
- +14 SET DIC=100
- SET DR=HMPFLDS
- SET DA=HMPORIEN
- SET DIQ=HMPRSLT
- SET DIQ(0)=HMPFLG
- SET FLAGS=HMPFLG
- +15 DO EN^DIQ1
- +16 QUIT
- +17 ;
- DIALOG(HMPORIEN) ; function, return (#2) DIALOG [5V] for ORDER
- +1 QUIT $PIECE($GET(^OR(100,+$GET(HMPORIEN),0)),"^",5)
- +2 ;
- ORDTOP(HMPORDFL,HMPORDIEN,HMPORDND) ; function, return top-level node from a file in ^ORD (file list below)
- +1 ;
- +2 ; all required
- IF '($GET(HMPORDFL)>0)!'($GET(HMPORDIEN)>0)!'$LENGTH($GET(HMPORDND))
- QUIT ""
- +3 ;
- +4 ; returns internal format
- QUIT $GET(^ORD(HMPORDFL,HMPORDIEN,HMPORDND))
- +5 ;
- +6 ;
- +7 ; files in the ^ORD global:
- +8 ;
- +9 ;ORDER STATUS (#100.01)
- +10 ;NATURE OF ORDER (#100.02)
- +11 ;ORDER REASON (#100.03)
- +12 ;ORDER CHECK INSTANCES (#100.05)
- +13 ;OE/RR PRINT FIELDS (#100.22)
- +14 ;OE/RR PRINT FORMATS (#100.23)
- +15 ;OE/RR RELEASE EVENTS (#100.5)
- +16 ;OE/RR AUTO-DC RULES (#100.6)
- +17 ;OE/RR EPCS PARAMETERS (#100.7)
- +18 ;ORDER CHECKS (#100.8)
- +19 ;OE/RR NOTIFICATIONS (#100.9)
- +20 ;DISPLAY GROUP (#100.98)
- +21 ;ORDER PARAMETERS (#100.99)
- +22 ;PROTOCOL (#101)
- +23 ;OR CPRS TABS (#101.13)
- +24 ;OE/RR COM OBJECTS (#101.15)
- +25 ;OE/RR REPORT (#101.24)
- +26 ;ORDER EXECUTE CODES (#101.3)
- +27 ;ORDER DIALOG (#101.41)
- +28 ;ORDER URGENCY (#101.42)
- +29 ;ORDERABLE ITEMS (#101.43)
- +30 ;ORDER QUICK VIEW (#101.44)
- +31 ;CPRS QUERY DEFINITION (#102.21)
- +32 ;CPRS QUERY CONSTRAINT (#102.22)
- +33 ;CPRS QUERY EDIT CONTROL (#102.23)
- +34 ;CPRS QUERY DISPLAY FIELDS (#102.24)
- +35 ;