Episode 79 Report Creation for the CPRS Reports Tab

From VistApedia
Jump to: navigation, search

There seems to be very little documentation on how to make a new report in a patients CPRS report tab. This is more or less how to create a census report in patients report tab. Note that this breaks the paradigm of no aggregate patient data in the report tab. There should only be that patients information in the report tab. However, for expediency of delivery of that report we have broken that paradigm for facility census purposes.


ASTRON>D ^XQ1

Select OPTION NAME: XPAR EDIT
     1   XPAR EDIT BY TEMPLATE       Edit Parameter Values with Template
     2   XPAR EDIT KEYWORD       Edit Parameter Definition Keyword
     3   XPAR EDIT PARAMETER       Edit Parameter Values
CHOOSE 1-3: 3  XPAR EDIT PARAMETER     Edit Parameter Values
Edit Parameter Values
                         --- Edit Parameter Values ---

Select PARAMETER DEFINITION NAME: ORW
     1   ORW ADDORD INPT     Write Orders (Inpatient)
     2   ORWCH BOUNDS     Form or Control Boundaries
     3   ORWCH COLUMNS     Column Widths
     4   ORWCH COLUMNS REPORTS     Report Column Widths
     5   ORWCH FONT SIZE     Font Size for Chart
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-5:
     6   ORWCH WIDTH     Control Width
     7   ORWCOM ORDER ACCEPTED     COM Object on Order Acceptance
     8   ORWCOM PATIENT SELECTED     COM Object on Patient Selection
     9   ORWCV1 COVERSHEET LIST     List of coversheet reports
     10  ORWD ACTIVITY INPT     Activity List - Inpatient
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-10:
     11  ORWD COMMON CLINIC     Common Clinics
     12  ORWD COMMON LAB INPT     Common Labs - Inpatient
     13  ORWD COMMON MED INPT     Common Meds - Inpatient
     14  ORWD COMMON MED OUTPT     Common Meds - Outpatient
     15  ORWD CONSULT SERVICES     Consult Services
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-15:
     16  ORWD NONVA REASON     Non-VA Meds Statement/Reason
     17  ORWD PTCARE GENERAL INPT     Patient Care General - Inpatient
     18  ORWD PTCARE HEMODYNAMICS INPT     Patient Care Hemodynamics - Inpatient
     19  ORWD PTCARE NURSING INPT     Patient Care Nursing - Inpatient
     20  ORWD PTCARE OXYGEN INPT     Patient Care Oxygen - Inpatient
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-20:
     21  ORWD PTCARE RESP INPT     Patient Care Respiratory - Inpatient
     22  ORWD PTCARE SKIN INPT     Patient Care Skin and Wound - Inpatient
     23  ORWD PTCARE TUBES INPT     Patient Care Drains/Tubes - Inpatient
     24  ORWDP DEFAULT PRINTER     Default printer for CPRS GUI
     25  ORWDP WINPRINT DEFAULT     Use Windows printer as default?
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-25:
     26  ORWDPS ROUTING DEFAULT     Medication Routing Default (GUI)
     27  ORWDPS SUPPRESS DISPENSE MSG     Suppress Dispense Drug Message
     28  ORWDQ ANI     Common Angio/Neuro Orders
     29  ORWDQ CARD     Common Cardiology (Nuc Med) Orders
     30  ORWDQ CSLT     Common Consult Orders
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-30:
     31  ORWDQ CT     Common CT Scan Orders
     32  ORWDQ DISPLAY NAME     Quick Order Display Name
     33  ORWDQ DO     Common Diet Orders
     34  ORWDQ IV RX     Common IV Fluid Orders
     35  ORWDQ LAB     Common Lab Orders
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-35:
     36  ORWDQ MAM     Common Mammography Orders
     37  ORWDQ MRI     Common MRI Orders
     38  ORWDQ NM     Common Nuclear Med Orders
     39  ORWDQ O RX     Common Med Orders (Outpatient)
     40  ORWDQ PROC     Common Procedure Orders
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-40:
     41  ORWDQ QUICK VIEW     Personal Quick Order List
     42  ORWDQ RAD     Common Radiology Orders
     43  ORWDQ TF     Common Tubefeeding Orders
     44  ORWDQ UD RX     Common Med Orders (Inpatient)
     45  ORWDQ UNIT DOSE MEDICATIONS     Common Med Orders (Inpatient)
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-45:
     46  ORWDQ US     Common Ultrasound Orders
     47  ORWDQ VAS     Common Vascular Lab Orders
     48  ORWDQ XRAY     Common Imaging Orders
     49  ORWDX NEW CONSULT     New consult dialog default
     50  ORWDX NEW MED     New Med Dialog
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-50:
     51  ORWDX NEW PROCEDURE     New procedure dialog default
     52  ORWDX WRITE ORDERS EVENT LIST     Menu for Write Orders List by Event
     53  ORWDX WRITE ORDERS LIST     Menu for Write Orders List
     54  ORWDXM ORDER MENU STYLE     Order Menu Style
     55  ORWDXVB VBECS TNS CHECK     Days to check for Type & Screen
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-55:
     56  ORWG GRAPH EXCLUDE DATA TYPE     CPRS Graph Exclude Data Types
     57  ORWG GRAPH PUBLIC EDITOR CLASS     CPRS Graph Public Editor Classes
     58  ORWG GRAPH SETTING     CPRS Graph Settings
     59  ORWG GRAPH SIZING     CPRS Graph Position and Sizes
     60  ORWG GRAPH VIEW     CPRS Graph Views
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-60:
     61  ORWIM NSS MESSAGE     MESSAGE FOR NON-STANDARD SCHEDULE
     62  ORWLR LC CHANGED TO WC     MESSAGE FOR LC CHANGED TO WC
     63  ORWOR AUTO CLOSE PT MSG     Auto-Close Patient Messages
     64  ORWOR AUTOSAVE NOTE     Interval for Autosave of Notes
     65  ORWOR BROADCAST MESSAGES     Broadcast Window Messages to Other Apps
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-65:
     66  ORWOR CATEGORY SEQUENCE     Orders Category Sequence
     67  ORWOR COVER RETRIEVAL     Cover Sheet Retrieval Mode
     68  ORWOR COVER RETRIEVAL NEW     Cover Sheet Retrieval Mode
     69  ORWOR DISABLE HOLD ORDERS     Disable Hold/Unhold Actions in GUI
     70  ORWOR DISABLE ORDERING     Disable Ordering in GUI
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-70:
     71  ORWOR DISABLE WEB ACCESS     Disable web links in GUI
     72  ORWOR ENABLE VERIFY     Enable/Disable Order Verify Actions
     73  ORWOR EXPIRED ORDERS     Hours to find recently expired orders
     74  ORWOR PKI SITE     PKI Functionality Site Enabled
     75  ORWOR PKI USE     Allow PKI Functionality
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-75:
     76  ORWOR REQUIRE CURRENT CLIENT     Require Client/Server Version Match
     77  ORWOR SHOW CONSULTS     Show unresolved consults
     78  ORWOR SHOW SURGERY TAB     Show Surgery Tab in GUI
     79  ORWOR SPELL CHECK ENABLED?     Enable spelling/grammar checking in GUI.
     80  ORWOR TIMEOUT CHART     Timeout for GUI chart
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-80:
     81  ORWOR TIMEOUT COUNTDOWN     Countdown Seconds upon Timeout
     82  ORWOR VERIFY NOTE TITLE     Verify Note Title
     83  ORWOR WRITE ORDERS LIST     Write Orders (Inpatient)
     84  ORWPCE ANYTIME ENCOUNTERS     Anytime Encounters
     85  ORWPCE ASK ENCOUNTER UPDATE     Ask Encounter Update
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-85:
     86  ORWPCE DISABLE AUTO CHECKOUT     Disable Automatic Checkout
     87  ORWPCE DISABLE AUTO VISIT TYPE     Disable Auto Visit Type
     88  ORWPCE EXCLUDE EXAMS     Excluded Exams
     89  ORWPCE EXCLUDE HEALTH FACTORS     Excluded Health Factors
     90  ORWPCE EXCLUDE IMMUNIZATIONS     Excluded Immunizations
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-90:
     91  ORWPCE EXCLUDE PATIENT ED     Excluded Patient Education Topics
     92  ORWPCE EXCLUDE SKIN TESTS     Excluded Skin Tests
     93  ORWPCE FORCE PCE ENTRY     Force PCE Entry
     94  ORWPFSS ACTIVE     Activate CPRS PFSS Switch
     95  ORWRP ADHOC LOOKUP     Adhoc Health Summary Lookup
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-95:
     96  ORWRP CIRN AUTOMATIC     Auto query all sites
     97  ORWRP CIRN REMOTE DATA ALLOW     Allow remote data access
     98  ORWRP CIRN SITES     Remote Access Allowed
     99  ORWRP CIRN SITES ALL     Allow remote data access to all sites.
     100 ORWRP HDR ON     Turn Remote Queries to HDR on
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-100:
     101 ORWRP HEALTH SUMMARY LIST ALL     List All Health Summary Types
     102 ORWRP HEALTH SUMMARY TYPE LIST     Allowable Health Summary Types
     103 ORWRP REPORT LAB LIST     List of lab reports
     104 ORWRP REPORT LIST     List of reports
     105 ORWRP TIME/OCC LIMITS ALL     Default time/occ for all reports
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 21-105: 104  ORWRP REPORT LIST   List of reports

ORWRP REPORT LIST may be set for the following:

     2   User          USR    [choose from NEW PERSON]
     3   Division      DIV    [choose from INSTITUTION]
     4   System        SYS    [WVEHR309.OPENFORUM.OPENSOURCEVISTA.NET]
     6   Package       PKG    [ORDER ENTRY/RESULTS REPORTING]

Enter selection: 6  Package   ORDER ENTRY/RESULTS REPORTING

Parameters set for 'Package' may be replaced if ORDER ENTRY/RESULTS REPORTING
is installed in this account.

--- Setting ORWRP REPORT LIST  for Package: ORDER ENTRY/RESULTS REPORTING ---
Select Sequence: ?


Sequence  Value
--------  -----
1         TMG GROWTH CHARTS
1.1       TMG WHO GROWTH CHARTS
2         ORRPW REPORT CATEGORIES
3         TMG GROWTH CHARTS
3.1       TMG WHO GROWTH CHARTS
4         TMG GROWTH CHARTS
4.1       TMG WHO GROWTH CHARTS
5         ORRP HEALTH SUMMARY
6         ORRPW HDR
8         ORRPW DOD
10        ORRP IMAGING
12        ORWG GRAPHING
15        ORRP LAB STATUS
20        ORRP BLOOD BANK
25        ORRP AP ALL
30        ORRP DIETETICS PROFILE
35        ORRP NUTRITIONAL ASSESS
40        ORRP VITALS CUM
45        ORRP PROCEDURES
50        ORRP DAILY ORDER SUMMARY

Type <Enter> to continue or '^' to exit:
55        ORRP ORDER SUM FOR A DATE RNG
60        ORRP CHART COPY SUMMARY
65        ORRP OUTPATIENT RX PROFILE
70        ORRP BCMA MED LOG
75        ORRP BCMA MAH
80        ORRP SURGERIES
85        ORRP ECS


Select Sequence:

ORWRP REPORT LIST may be set for the following:

     2   User          USR    [choose from NEW PERSON]
     3   Division      DIV    [choose from INSTITUTION]
     4   System        SYS    [WVEHR309.OPENFORUM.OPENSOURCEVISTA.NET]
     6   Package       PKG    [ORDER ENTRY/RESULTS REPORTING]

Enter selection: S  System   WVEHR309.OPENFORUM.OPENSOURCEVISTA.NET

 Setting ORWRP REPORT LIST  for System: WVEHR309.OPENFORUM.OPENSOURCEVISTA.NET
Select Sequence: ?


There are currently no entries for Sequence.


Select Sequence:

ORWRP REPORT LIST may be set for the following:

     2   User          USR    [choose from NEW PERSON]
     3   Division      DIV    [choose from INSTITUTION]
     4   System        SYS    [WVEHR309.OPENFORUM.OPENSOURCEVISTA.NET]
     6   Package       PKG    [ORDER ENTRY/RESULTS REPORTING]

Enter selection: 3  Division   INSTITUTION
Select INSTITUTION NAME: ?
 Answer with INSTITUTION NAME, or STATUS, or STATION NUMBER, or
     OFFICIAL VA NAME, or CURRENT LOCATION, or CODING SYSTEM/ID PAIR, or
     NPI, or STATUS, or NAME (CHANGED FROM), or CODING SYSTEM
 Do you want the entire INSTITUTION List? N  (No)
Select INSTITUTION NAME:
-------------------------------------------------------------------------------

Select PARAMETER DEFINITION NAME:    ORWRP REPORT LIST   List of reports

ORWRP REPORT LIST may be set for the following:

     2   User          USR    [choose from NEW PERSON]
     3   Division      DIV    [choose from INSTITUTION]
     4   System        SYS    [WVEHR309.OPENFORUM.OPENSOURCEVISTA.NET]
     6   Package       PKG    [ORDER ENTRY/RESULTS REPORTING]

Enter selection: 2  User   NEW PERSON
Select NEW PERSON NAME: ?
 Answer with NEW PERSON NAME, or INITIAL, or SSN, or VERIFY CODE, or
     NICK NAME, or SERVICE/SECTION, or NPI, or DEA#, or VA#, or ALIAS, or
     NPI, or C0P SUBSCRIPTION TYPE
 Do you want the entire NEW PERSON List? N  (No)
Select NEW PERSON NAME: ZZ PAT ??

Select NEW PERSON NAME: ZZ PATIENT,TEST FOUR ??

Select NEW PERSON NAME: ?
 Answer with NEW PERSON NAME, or INITIAL, or SSN, or VERIFY CODE, or
     NICK NAME, or SERVICE/SECTION, or NPI, or DEA#, or VA#, or ALIAS, or
     NPI, or C0P SUBSCRIPTION TYPE
 Do you want the entire NEW PERSON List? Y  (Yes)
   Choose from:
   ABASS,SIORJINI        SA
   ADEDIRAN,JUBRIL        JA
   ADMINISTRATOR,SYSTEM        SA
   AGEE,DORCAS        DA
   AGUILAR,AUTUMN        AA
   AMBUSH,BRITTANY        BA
   ANALYST,FOUR        AF     IRM     ANALYST
   ANALYST,GEORGE        GOW     IRM     ANALYST
   ANALYST,ONE        OA     IRM     ANALYST
   ANALYST,THREE        TA     IRM     ANALYST
   ANALYST,TWO        TA     IRM     ANALYST
   AUTHORIZER,IB MRA        MRA
   AUTOFINISH,RX
   AYODELE,SHOLA        SA
   BARRERA,CRYSTAL        CB
   BATCH,ERX
   BENAVIDES,LETICIA        LB     Biller
   BRYANT,MAETRICE        MB
   CANTU,DIANA        DC
   CASARES,GEORGE        GC     Psychiatry
                                   to exit: ^

Select NEW PERSON NAME: ANALYST,GEORGE       GOW     IRM     ANALYST

------------ Setting ORWRP REPORT LIST  for User: ANALYST,GEORGE ------------
Select Sequence: ?


There are currently no entries for Sequence.


Select Sequence: 1
Are you adding 1 as a new Sequence? Yes//   YES

Sequence: 1//    1
Report: DISC ??
Report: OR
     1   ORAM ANTICOAG REPORT       Anticoagulation Flowsheet     Anticoagulatio
n Flowsheet
     2   ORRP ADHOC HEALTH SUMMARY       Adhoc Health Summary     Adhoc Health S
ummary
     3   ORRP ALL TESTS BY DATE       ALL TESTS BY DATE
     4   ORRP ANATOMIC PATHOLOGY       Anatomic Pathology - All Reports     Anat
omic Pathology - All Reports
     5   ORRP AP ALL       Anatomic Pathology     Anatomic Pathology
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-5:
     6   ORRP AP CY       Cytopathology     Cytopathology
     7   ORRP AP EM       Electron Microscopy     Electron Microscopy
     8   ORRP AP SP       Surgical Pathology     Surgical Pathology
     9   ORRP BCMA MAH       Med Admin History (BCMA)     Med Admin History (BCM
A)
     10  ORRP BCMA MED LOG       Med Admin Log (BCMA)     Med Admin Log (BCMA)
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-10:
     11  ORRP BLOOD BANK       Blood Bank Report     Blood Bank Report
     12  ORRP CHART COPY SUMMARY       Chart Copy Summary     Chart Copy Summary
     13  ORRP CUSTOM ORDER SUMMARY       Custom Order Summary     Custom Order S
ummary
     14  ORRP DAILY ORDER SUMMARY       Daily Order Summary     Daily Order Summ
ary
     15  ORRP DIETETICS PROFILE       Dietetics Profile     Dietetics Profile
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-15:
     16  ORRP ECS       Event Capture     Event Capture Report
     17  ORRP ECS PCE SUMMARY       Patient PCE Summary     Report from Event Ca
pture
     18  ORRP ECS PT SUMMARY       Patient Data Summary     Report from Event Ca
pture
     19  ORRP HEALTH SUMMARY       Health Summary     Health Summary
     20  ORRP IMAGING       Imaging (local only)     Imaging (local only)
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-20:
     21  ORRP LAB GRAPH       LAB GRAPH
     22  ORRP LAB STATUS       Lab Status     Lab Status
     23  ORRP NUTRITIONAL ASSESS       Nutritional Assessment     Nutritional As
sessment
     24  ORRP ORDER SUM FOR A DATE RNG       Order Summary for a Date Range
Order Summary for a Date Range
     25  ORRP OUTPATIENT RX PROFILE       Outpatient RX Profile     Outpatient R
X Profile
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-25:
     26  ORRP PROBLEM LIST       Problem List     Problem List
     27  ORRP PROCEDURES       Procedures (local only)     Procedures (local onl
y)
     28  ORRP SELECTED TESTS BY DATE       SELECTED TESTS BY DATE
     29  ORRP SURGERIES       Surgery (local only)     Surgery (local only)
     30  ORRP VITALS CUM       Vitals Cumulative     Vitals Cumulative
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-30:
     31  ORRPW ADT ADM DC       Adm./Discharge     Adm./Discharge
     32  ORRPW ADT DC DIAG       Discharge Diagnosis     Discharge Diagnosis
     33  ORRPW ADT DEMO       Patient Information     Patient Information
     34  ORRPW ADT DEMOG       Demographics     Demographics
     35  ORRPW ADT DISAB       Disabilities     Disabilities
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-35:
     36  ORRPW ADT DISC       Discharges     Discharges
     37  ORRPW ADT EXP       Expanded ADT     Expanded ADT
     38  ORRPW ADT FUTURE CLINIC       Future Clinic Visits     Future Clinic Vi
sits
     39  ORRPW ADT HISTORY       ADT History     ADT History
     40  ORRPW ADT ICD PROC       ICD Procedures     ICD Procedures
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-40: 31  ORRPW ADT ADM DC     Adm./Discharge     Adm./Discharge
Select Sequence:

ORWRP REPORT LIST may be set for the following:

     2   User          USR    [choose from NEW PERSON]
     3   Division      DIV    [choose from INSTITUTION]
     4   System        SYS    [WVEHR309.OPENFORUM.OPENSOURCEVISTA.NET]
     6   Package       PKG    [ORDER ENTRY/RESULTS REPORTING]

Enter selection:
-------------------------------------------------------------------------------

Select PARAMETER DEFINITION NAME:    ORWRP REPORT LIST   List of reports

ORWRP REPORT LIST may be set for the following:

     2   User          USR    [choose from NEW PERSON]
     3   Division      DIV    [choose from INSTITUTION]
     4   System        SYS    [WVEHR309.OPENFORUM.OPENSOURCEVISTA.NET]
     6   Package       PKG    [ORDER ENTRY/RESULTS REPORTING]

Enter selection: 6  Package   ORDER ENTRY/RESULTS REPORTING

Parameters set for 'Package' may be replaced if ORDER ENTRY/RESULTS REPORTING
is installed in this account.

--- Setting ORWRP REPORT LIST  for Package: ORDER ENTRY/RESULTS REPORTING ---
Select Sequence: ?


Sequence  Value
--------  -----
1         TMG GROWTH CHARTS
1.1       TMG WHO GROWTH CHARTS
2         ORRPW REPORT CATEGORIES
3         TMG GROWTH CHARTS
3.1       TMG WHO GROWTH CHARTS
4         TMG GROWTH CHARTS
4.1       TMG WHO GROWTH CHARTS
5         ORRP HEALTH SUMMARY
6         ORRPW HDR
8         ORRPW DOD
10        ORRP IMAGING
12        ORWG GRAPHING
15        ORRP LAB STATUS
20        ORRP BLOOD BANK
25        ORRP AP ALL
30        ORRP DIETETICS PROFILE
35        ORRP NUTRITIONAL ASSESS
40        ORRP VITALS CUM
45        ORRP PROCEDURES
50        ORRP DAILY ORDER SUMMARY

Type <Enter> to continue or '^' to exit: ^


Select Sequence: ?


Sequence  Value
--------  -----
1         TMG GROWTH CHARTS
1.1       TMG WHO GROWTH CHARTS
2         ORRPW REPORT CATEGORIES
3         TMG GROWTH CHARTS
3.1       TMG WHO GROWTH CHARTS
4         TMG GROWTH CHARTS
4.1       TMG WHO GROWTH CHARTS
5         ORRP HEALTH SUMMARY
6         ORRPW HDR
8         ORRPW DOD
10        ORRP IMAGING
12        ORWG GRAPHING
15        ORRP LAB STATUS
20        ORRP BLOOD BANK
25        ORRP AP ALL
30        ORRP DIETETICS PROFILE
35        ORRP NUTRITIONAL ASSESS
40        ORRP VITALS CUM
45        ORRP PROCEDURES
50        ORRP DAILY ORDER SUMMARY

Type <Enter> to continue or '^' to exit:
55        ORRP ORDER SUM FOR A DATE RNG
60        ORRP CHART COPY SUMMARY
65        ORRP OUTPATIENT RX PROFILE
70        ORRP BCMA MED LOG
75        ORRP BCMA MAH
80        ORRP SURGERIES
85        ORRP ECS


Select Sequence: 2

Sequence: 2//    2
Report: ORRPW REPORT CATEGORIES//   ORRPW REPORT CATEGORIES     Clinical Reports
     Clinical Reports
Select Sequence:

ORWRP REPORT LIST may be set for the following:

     2   User          USR    [choose from NEW PERSON]
     3   Division      DIV    [choose from INSTITUTION]
     4   System        SYS    [WVEHR309.OPENFORUM.OPENSOURCEVISTA.NET]
     6   Package       PKG    [ORDER ENTRY/RESULTS REPORTING]

Enter selection:    Package   ORDER ENTRY/RESULTS REPORTING

Parameters set for 'Package' may be replaced if ORDER ENTRY/RESULTS REPORTING
is installed in this account.

--- Setting ORWRP REPORT LIST  for Package: ORDER ENTRY/RESULTS REPORTING ---
Select Sequence:

ORWRP REPORT LIST may be set for the following:

     2   User          USR    [choose from NEW PERSON]
     3   Division      DIV    [choose from INSTITUTION]
     4   System        SYS    [WVEHR309.OPENFORUM.OPENSOURCEVISTA.NET]
     6   Package       PKG    [ORDER ENTRY/RESULTS REPORTING]

Enter selection: 2  User   NEW PERSON
Select NEW PERSON NAME: ANALYS
     1   ANALYST,FOUR       AF     IRM     ANALYST
     2   ANALYST,GEORGE       GOW     IRM     ANALYST
     3   ANALYST,ONE       OA     IRM     ANALYST
     4   ANALYST,THREE       TA     IRM     ANALYST
     5   ANALYST,TWO       TA     IRM     ANALYST
CHOOSE 1-5: 2  ANALYST,GEORGE     GOW     IRM     ANALYST

------------ Setting ORWRP REPORT LIST  for User: ANALYST,GEORGE ------------
Select Sequence: ?


Sequence  Value
--------  -----
1         ORRPW ADT ADM DC


Select Sequence: 1

Sequence: 1// @  ...deleted

ORWRP REPORT LIST may be set for the following:

     2   User          USR    [choose from NEW PERSON]
     3   Division      DIV    [choose from INSTITUTION]
     4   System        SYS    [WVEHR309.OPENFORUM.OPENSOURCEVISTA.NET]
     6   Package       PKG    [ORDER ENTRY/RESULTS REPORTING]

Enter selection: ^
-------------------------------------------------------------------------------

Select PARAMETER DEFINITION NAME:
%GTM-I-CTRLC, CTRL_C encountered

ASTRON>D P^DI


VA FILEMAN 22.2V2


Select OPTION: INQUIRE TO FILE ENTRIES



Output from what File: NEW PERSON// OR
     1   OR CPRS TABS                     (2 entries)
     2   ORAM FLOWSHEET                   (0 entries)
     3   ORDER                            (848 entries)
     4   ORDER ACKNOWLEDGEMENT            (0 entries)
     5   ORDER CHECK COMPILER FUNCTIONS    (56 entries)
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-5:
     6   ORDER CHECK DATA CONTEXT         (7 entries)
     7   ORDER CHECK DATA FIELD           (159 entries)
     8   ORDER CHECK DATA SOURCE          (15 entries)
     9   ORDER CHECK ELEMENT              (140 entries)
     10  ORDER CHECK NATIONAL TERM        (15 entries)
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-10:
     11  ORDER CHECK PATIENT ACTIVE DATA    (0 entries)
     12  ORDER CHECK PATIENT RULE EVENT    (1 entry)
     13  ORDER CHECK RAW DATA LOG         (1 entry)
     14  ORDER CHECK RULE                 (71 entries)
     15  ORDER CHECKS                     (27 entries)
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-15:
     16  ORDER DELAY REASONS              (9 entries)
     17  ORDER DIALOG                     (332 entries)
     18  ORDER EXECUTE CODES              (20 entries)
     19  ORDER PARAMETERS                 (1 entry)
     20  ORDER QUICK VIEW                 (6 entries)
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-20:
     21  ORDER REASON                     (20 entries)
     22  ORDER STATISTICS                 (0 entries)
     23  ORDER STATUS                     (16 entries)
     24  ORDER STATUS                     (18 entries)
     25  ORDER TYPE                       (25 entries)
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-25:
     26  ORDER UNIT                       (33 entries)
     27  ORDER URGENCY                    (15 entries)
     28  ORDERABLE ITEMS                  (3624 entries)
CHOOSE 1-28:

Output from what File: NEW PERSON// OE
     1   OE/RR AUTO-DC RULES              (10 entries)
     2   OE/RR COM OBJECTS                (1 entry)
     3   OE/RR ERRORS                     (10000 entries)
     4   OE/RR LIST                       (1 entry)
     5   OE/RR NOTIFICATIONS              (57 entries)
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-5: 4  OE/RR LIST                 (1 entry)
Select OE/RR LIST NAME: ?
    Answer with OE/RR LIST NAME, or UPPER CASE, or USER:
   DR KING

Select OE/RR LIST NAME: ^




Select OPTION: INQUIRE TO FILE ENTRIES



Output from what File: OE/RR LIST// OE
     1   OE/RR AUTO-DC RULES              (10 entries)
     2   OE/RR COM OBJECTS                (1 entry)
     3   OE/RR ERRORS                     (10000 entries)
     4   OE/RR LIST                       (1 entry)
     5   OE/RR NOTIFICATIONS              (57 entries)
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-5:
     6   OE/RR PATIENT EVENT              (2 entries)
     7   OE/RR PRINT FIELDS               (78 entries)
     8   OE/RR PRINT FORMATS              (36 entries)
     9   OE/RR PT SEL COMBO               (0 entries)
     10  OE/RR RELEASE EVENTS             (2 entries)
Press <Enter> to see more, '^' to exit this list,  OR
CHOOSE 1-10:
     11  OE/RR REPORT                     (195 entries)
CHOOSE 1-11: 11  OE/RR REPORT             (195 entries)
Select OE/RR REPORT NAME: AD ??

Select OE/RR REPORT NAME: ?
 Answer with OE/RR REPORT NUMBER, or NAME
 Do you want the entire 195-Entry OE/RR REPORT List? Y  (Yes)
   Choose from:
   1            ORRP HEALTH SUMMARY     Health Summary     Health Summary
   2            ORRP BLOOD BANK     Blood Bank Report     Blood Bank Report
   3            ORRP AP ALL     Anatomic Pathology     Anatomic Pathology
   4            ORRP DIETETICS PROFILE     Dietetics Profile     Dietetics Profi
le
   5            ORRP VITALS CUM     Vitals Cumulative     Vitals Cumulative
   6            ORRP IMAGING     Imaging (local only)     Imaging (local only)
   7            ORRP LAB STATUS     Lab Status     Lab Status
   8            ORRP NUTRITIONAL ASSESS     Nutritional Assessment     Nutrition
al Assessment
   9            ORRP PROCEDURES     Procedures (local only)     Procedures (loca
l only)
   10           ORRP DAILY ORDER SUMMARY     Daily Order Summary     Daily Order
 Summary
   11           ORRP ORDER SUM FOR A DATE RNG     Order Summary for a Date Range
     Order Summary for a Date Range
   12           ORRP CHART COPY SUMMARY     Chart Copy Summary     Chart Copy Su
mmary
   13           ORRP OUTPATIENT RX PROFILE     Outpatient RX Profile     Outpati
ent RX Profile
                                   to exit:
   14           ORRP ALL TESTS BY DATE     ALL TESTS BY DATE
   15           ORRP SELECTED TESTS BY DATE     SELECTED TESTS BY DATE
   16           ORRP LAB GRAPH     LAB GRAPH
   17           ORRP CUSTOM ORDER SUMMARY     Custom Order Summary     Custom Or
der Summary
   18           ORL MOST RECENT     Most Recent     Most Recent
   19           ORL CUMULATIVE     Cumulative     Cumulative
   20           ORL ALL TESTS BY DATE     All Tests by Date     All Tests by Dat
e
   21           ORL WORKSHEET     Worksheet     Worksheet
   22           ORL GRAPH     Graph     Graph
   23           ORL MICROBIOLOGY     Microbiology     Microbiology
   24           ORL ANATOMIC PATHOLOGY     Anatomic Pathology - All Reports
Anatomic Pathology - All Reports
   25           ORL BLOOD BANK     Blood Bank     Blood Bank
   26           ORL LAB STATUS     Lab Status     Lab Status
   27           ORL SELECTED TESTS BY DATE     Selected Tests by Date     Select
ed Tests by Date
   28           ORCV ACTIVE PROBLEMS     Active Problems
   29           ORCV ALLERGIES     Allergies / Adverse Reactions
   30           ORCV POSTINGS     Postings
   31           ORCV ACTIVE MEDICATIONS     Active Medications
                                   to exit:
   32           ORCV CLINICAL REMINDERS     Clinical Reminders
                      Due Date
   33           ORCV RECENT LAB RESULTS     Recent Lab Results
   34           ORCV VITALS     Vitals
   35           ORCV APPOINTMENTS     Appointments/Visits/Admissions
   36           ORCV ACTIVE PROBLEM DETAILS     Active Problem Details
   37           ORCV ALLERGIES DETAILS     Allergies Details
   38           ORCV POSTINGS DETAILS     Postings Details
   39           ORCV ACTIVE MED DETAILS     Active Med Details
   40           ORCV RECENT LAB DETAILS     Recent Lab Details
   41           ORCV VISIT DETAILS     Visit Details
   42           ORRP ADHOC HEALTH SUMMARY     Adhoc Health Summary     Adhoc Hea
lth Summary
   43           ORRP BCMA MED LOG     Med Admin Log (BCMA)     Med Admin Log (BC
MA)
   44           ORRP BCMA MAH     Med Admin History (BCMA)     Med Admin History
 (BCMA)
   48           ORRP SURGERIES     Surgery (local only)     Surgery (local only)
   49           TMG GRAPH     TMG GRAPH     TMG GRAPH
   50           TMG CHILD - HEIGHT CHART     CHILD - HEIGHT CHART     TMG GROWTH
 CHART HEIGHT (CHILD)
   51           TMG INFANT - HEAD CIRC CHART     INFANT - HEAD CIRC CHART     TM
G GROWTH CHART FOR HEAD CIRCUMFERENCE
                                   to exit:
   52           TMG CHILD - WEIGHT CHART     CHILD - WEIGHT CHART     TMG GROWTH
 CHART WEIGHT (CHILD)
   53           TMG CHILD - BMI CHART     CHILD - BMI CHART     TMG GROWTH CHART
 BMI (CHILD)
   54           TMG INFANT - WT FOR LEN CHART     INFANT -- WEIGHT FOR LENGTH CH
ART     INFANT WEIGHT FOR LENGTH CHART
   55           TMG INFANT - BMI CHART     INFANT - BMI CHART     TMG GROWTH CHA
RT BMI (INFANT)
   56           TMG INFANT - WEIGHT CHART     INFANT - WEIGHT CHART     TMG GROW
TH CHART WEIGHT (INFANT)
   57           TMG INFANT - LENGTH CHART     INFANT - LENGTH CHART     TMG GROW
TH CHART LENGTH (INFANT)
   58           TMG GROWTH CHARTS     TMG GROWTH CHARTS     TMG GROWTH CHART MEN
U
   59           TMG WHO BA CHART     WHO BMI CHART     WHO BMI CHART
   60           TMG WHO GROWTH CHARTS     TMG WHO GROWTH CHARTS     TMG WHO GROW
TH CHART MENU
   61           TMG WHO BMI B2     BMI - Birth to 2 Years     WHO - BMI  Birth t
o 2 Years
   62           TMG WHO BMI B5     BMI - Birth to 5 Years     WHO - BMI Birth to
 5 Years
   63           TMG WHO BMI 25     BMI - 2 Years to 5 Years     WHO - BMI  2 Yea
rs TO 5 Years
                                   to exit:
   64           TMG WHO LENGTH B6     Length - Birth to 6 Months     WHO - Lengt
h-for-age Birth to 6 Months
   65           TMG WHO LENGTH B2     Length - Birth to 2 Years     WHO - Length
-for-age Birth to 2 Years
   66           TMG WHO LENGTH 62     Length - 6 Months to 2 Years     WHO - Len
gth-for-age 6 Months to 2 Years
   67           TMG WHO LENGTH 25     Height - 2 Years to 5 Years     WHO - Heig
ht-for-age 2 Years to 5 Years
   68           TMG WHO LENGTH B5     Height - Birth to 5 Years      WHO - Heigh
t-for-age Birth to 5 Years
   69           TMG WHO WEIGHT B6     Weight - Birth to 6 Months     WHO - Weigh
t-for-age Birth to 6 Months
   70           TMG WHO WEIGHT B2     Weight - Birth to 2 Years     WHO - Weight
-for-age Birth to 2 Years
   71           TMG WHO WEIGHT 62     Weight - 6 Months to 2 Years     WHO - Len
gth-for-age 6 Months to 2 Years
   72           TMG WHO WEIGHT B5     Weight - Birth to 5 Years     WHO - Weight
-for-age Birth to 5 Years
   73           TMG WHO WEIGHT 25     Weight - 2 Years to 5 Years     WHO - Weig
ht-for-age 2 Years to 5 Years
   74           TMG WHO HC BT     Head Circumference - Birth to 13 Weeks     WHO
 - Head Circumference Birth to 13 Weeks
                                   to exit:
   75           TMG WHO HC B2     Head Circumference - Birth to 2 Years     WHO
- Head Circumference Birth to 2 Years
   76           TMG WHO HC B5     Head Circumference - Birth to 5 Years     WHO
- Head Circumference Birth to 5 Years
   77           TMG WHO WT4HT     Weight for Height - 2 Years to 5 Years     WHO
 - Weight-for-Height 2 Years to 5 Years
   1004         ORRPW DISCHARGE SUMMARY     Discharge Summary     Discharge Summ
ary
   1006         ORRPW RADIOLOGY IMAGING     Imaging     Imaging
   1007         ORRPW PROCEDURES     Procedures     Procedures
   1018         ORRPW ADT DEMO     Patient Information     Patient Information
   1020         ORRPW DIET     Dietetics     Dietetics
   1021         ORRPW LAB     Laboratory     Laboratory
   1022         ORRPW MEDICINE/CP     Medicine/CP     Medicine/CP
   1023         ORRPW ORDERS MENU     Orders     Orders
   1024         ORRPW PCE     Outpatient Encounters / GAF Scores      Outpatient
 Encounters / GAF Scores
   1025         ORRPW PHARMACY     Pharmacy     Pharmacy
   1026         ORRPW PROBLEM LIST     Problem List     Problem List
   1027         ORRPW RADIOLOGY     Radiology     Radiology
   1028         ORRPW SURGERY     Surgery Reports     Surgery Reports
   1029         ORRPW VITALS     Vital Signs     Vital Signs
                                   to exit:
   1030         ORRPW PN     Progress Notes     Progress Notes
   1031         ORRPW REPORT CATEGORIES     Clinical Reports     Clinical Report
s
   1032         ORRPW ALLERGIES ADV     Allergies     Allergies
   1033         ORRPW ADT DEMOG     Demographics     Demographics
   1034         ORRPW ADT INS     Insurance     Insurance
   1035         ORRPW ADT DISAB     Disabilities     Disabilities
   1036         ORRPW ADT ADM DC     Adm./Discharge     Adm./Discharge
   1037         ORRPW ADT EXP     Expanded ADT     Expanded ADT
   1038         ORRPW ADT DC DIAG     Discharge Diagnosis     Discharge Diagnosi
s
   1039         ORRPW ADT DISC     Discharges     Discharges
   1040         ORRPW ADT FUTURE CLINIC     Future Clinic Visits     Future Clin
ic Visits
   1041         ORRPW ADT ICD PROC     ICD Procedures     ICD Procedures
   1042         ORRPW ADT ICD SURG     ICD Surgeries     ICD Surgeries
   1043         ORRPW ADT TRANSFERS     Transfers     Transfers
   1044         ORRPW ADT TREATING SPEC     Treating Specialty     Treating Spec
ialty
   1045         ORRPW COMP     Comp & Pen Exams     Comp & Pen Exams
   1046         ORRPW DIET GEN     Generic     Diet Generic
   1047         ORRPW DIET DIET     Diet     Diet
                                   to exit: ^

Select OE/RR REPORT NAME: 1036  ORRPW ADT ADM DC     Adm./Discharge     Adm./Dis
charge
Another one:
Standard Captioned Output? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields

NUMBER: 1036                            NAME: ORRPW ADT ADM DC
  ID: OR_ADC                            REMOTE: YES
  QUALIFIER: HSComponent                ROUTINE: ORDV01
  ENTRY POINT: HSQUERY                  CATEGORY: LISTVIEW
  TAB: REPORTS TAB                      TYPE: LISTVIEW
  RPC: ORWRP REPORT TEXT
  REPORT COMPONENT: MAS ADMISSIONS/DISCHARGES
  HEADING: Adm./Discharge               DESCRIPTIVE TEXT: Adm./Discharge
  PRINT TAG: HSTYPEB                    PRINT ROUTINE: ORWRPP1



Select OE/RR REPORT NAME:


NOW HEALTH SUMMARY TYPE AND COMPONENTS FOR OE/RR REPORTS 1036


Output from what File: HEALTH SUMMARY COMPONENT// HEALTH SUMMARY TYPE
                                          (12 entries)
Select HEALTH SUMMARY TYPE NAME:    ADM DX
Another one:
Standard Captioned Output? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields

NAME: ADM DX                            OWNER: DOCTOR,THIRTEEN
  SUPPRESS COMP WITHOUT DATA: yes
SUMMARY ORDER: 5
  COMPONENT NAME: MAS ADMISSIONS/DISCHARGES
  OCCURRENCE LIMIT: 1                   TIME LIMIT: 1Y
  HEADER NAME: Admission/Discharge
SUMMARY ORDER: 10                       COMPONENT NAME: MAS ADT HISTORY EXPANDED
  TIME LIMIT: 1Y                        HEADER NAME: ADT History Expanded
  TIMESTAMP: 62260,33494

Another one:
Standard Captioned Output? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields

NUMBER: 10                              NAME: MAS ADMISSIONS/DISCHARGES
  PRINT ROUTINE: ENAD;GMTSDGA           TIME LIMITS APPLICABLE: yes
  ABBREVIATION: ADC                     MAXIMUM OCCURRENCES APPLICABLE: yes
  DEFAULT HEADER NAME: Admission/Discharge
 DESCRIPTION:   This component contains information from the MAS package.  Time
 and occurrence limits apply to this component.  Data presented include: date
 range of admission, ward, length of stay (LOS), last treating specialty, last
 provider, admitting diagnosis text, bedsection, principal diagnosis, diagnosis
 for longest length of stay (DXLS), and secondary ICD diagnoses.



Select HEALTH SUMMARY COMPONENT NAME: MAS ADT HISTORY EXPANDED
Another one:
Standard Captioned Output? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields

NUMBER: 64                              NAME: MAS ADT HISTORY EXPANDED
  PRINT ROUTINE: MAIN;GMTSDGCH          TIME LIMITS APPLICABLE: yes
  ABBREVIATION: EADT                    MAXIMUM OCCURRENCES APPLICABLE: yes
  DEFAULT HEADER NAME: ADT History Expanded
 DESCRIPTION:   This component contains information extracted from the MAS
 package. It is a consolidated view of all the MAS components. It can only be
 used with MAS Version 5 and up.

 Time and maximum occurrence limits apply. Data presented include patient
 eligibility and rated disabilities. Movement data then follows with movement
 date, movement type (ADM=Admission, TR=Transfer, TS= Treating Specialty,
 DC=Discharge), movement description, specialty, and provider.  Admissions
 include the admission diagnosis if the patient hasn't been discharged.
 Transfers included ward location and transfer facility.  Treating specialties
 includes Specialty Tranfers Diagnosis. Dicharges include the data in the
 Discharge Diagnosis and Discharges components.  Following the data for each
 admission ICD Procedures, and ICD Surgeries will be include if present.



Select HEALTH SUMMARY COMPONENT NAME:


ALSO HEALTH SUMMARY TYPE

FOR 1004 REPORT



Select OE/RR REPORT NAME: 1004  ORRPW DISCHARGE SUMMARY     Discharge Summary
  Discharge Summary
Another one:
Standard Captioned Output? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields

NUMBER: 1004                            NAME: ORRPW DISCHARGE SUMMARY
  ID: OR_DS                             REMOTE: YES
  QUALIFIER: HSWPComponent              ROUTINE: ORDV01
  ENTRY POINT: HSQUERY                  CATEGORY: LISTVIEW
  TAB: REPORTS TAB                      TYPE: LISTVIEW
  RPC: ORWRP REPORT TEXT                REPORT TAG: TIUDCS
  REPORT ROUTINE: ORDV04                REPORT COMPONENT: DISCHARGE SUMMARY
  HEADING: Discharge Summary            DESCRIPTIVE TEXT: Discharge Summary
  PRINT TAG: HSTYPEB                    PRINT ROUTINE: ORWRPP1
  EXTRACT TAG: TDCS                     EXTRACT ROUTINE: ORDV04
COLUMN HEADERS: Facility                SEQUENCE: 1
  PRINT LENGTH: 10                      INCLUDE ON PRINT: YES
COLUMN HEADERS: Admitted Date/Time      SEQUENCE: 3
  PRINT LENGTH: 18                      INCLUDE ON PRINT: YES
  PRINT TITLE: Admitted                 DATA TYPE: DATE/TIME
COLUMN HEADERS: Discharged Date/Time    SEQUENCE: 4
  PRINT LENGTH: 18                      INCLUDE ON PRINT: YES
  PRINT TITLE: Discharged               DATA TYPE: DATE/TIME
COLUMN HEADERS: Author / Dictated By    SEQUENCE: 5
  PRINT LENGTH: 10                      INCLUDE ON PRINT: YES
COLUMN HEADERS: Approved By             SEQUENCE: 6

Type <Enter> to continue or '^' to exit:
  PRINT LENGTH: 12                      INCLUDE ON PRINT: YES
  PRINT TITLE: Approved By
COLUMN HEADERS: Current Status          SEQUENCE: 7
  PRINT LENGTH: 10                      INCLUDE ON PRINT: YES
  PRINT TITLE: Status
COLUMN HEADERS: ID                      VISIBLE: NO
  SEQUENCE: 2
COLUMN HEADERS: Summary                 VISIBLE: NO
  SEQUENCE: 8                           TYPE: WORD PROCESSING
  INCLUDE ON DETAIL: YES                INCLUDE ON PRINT: YES
COLUMN HEADERS: [+]                     VISIBLE: YES
  SEQUENCE: 9
  SORT ORDER: 3:5                       FHIE DATA: YES

HEALTH SUMMARY TYPE

Output from what File: OE/RR REPORT// HEALTH SUMMARY TYPE
                                          (12 entries)
Select HEALTH SUMMARY TYPE NAME: DISCHARGE
     1   DISCHARGE DX
     2   DISCHARGE SUMMARY
CHOOSE 1-2: 2  DISCHARGE SUMMARY
Another one:
Standard Captioned Output? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields

NAME: DISCHARGE SUMMARY                 OWNER: DOCTOR,THIRTEEN
SUMMARY ORDER: 5                        COMPONENT NAME: DISCHARGE SUMMARY BRIEF
  OCCURRENCE LIMIT: 1                   TIME LIMIT: 1Y
  HEADER NAME: Brief Disch Summary
  TIMESTAMP: 62260,33050



Select HEALTH SUMMARY TYPE NAME:


utput from what File: OE/RR REPORT// HEALTH SUMMARY COMPONENT
                                          (108 entries)
Select HEALTH SUMMARY COMPONENT NAME: DISCHARGE SUMM
     1   DISCHARGE SUMMARY
     2   DISCHARGE SUMMARY BRIEF
CHOOSE 1-2: 1  DISCHARGE SUMMARY
Another one:
Standard Captioned Output? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields

NUMBER: 57                              NAME: DISCHARGE SUMMARY
  PRINT ROUTINE: MAIN;GMTSDS            TIME LIMITS APPLICABLE: yes
  ABBREVIATION: DCS                     MAXIMUM OCCURRENCES APPLICABLE: yes
  OUT OF ORDER MESSAGE: Discharge Summary Package not yet installed or available
  DEFAULT HEADER NAME: Discharge Summary
 DESCRIPTION:   This component prints all discharge summaries (including report
 text) for user-specified time and occurrence limits.



Select HEALTH SUMMARY COMPONENT NAME: ^


ASTRON>D ^%G

Output device: <terminal>:

List ^

ASTRON>D ^%G

Output device: <terminal>:

List ^DGPM("ATID1",622,*)
^DGPM("ATID1",622,6858797.9159669,241)=""

List ^

ASTRON>D P^DI


VA FILEMAN 22.2V2


Select OPTION:
ASTRON>D P^DI


VA FILEMAN 22.2V2


Select OPTION: INQUIRE TO FILE ENTRIES



Output from what File: PATIENT//          (2393 entries)
Select PATIENT NAME: `622
  ZZ PATIENT,TEST FOUR               <A>    M 01-01-2001 729010101P
                                                                      729010101P
Another one:
%GTM-I-CTRLC, CTRL_C encountered

ASTRON>D P^DI


VA FILEMAN 22.2V2


Select OPTION: INQUIRE TO FILE ENTRIES



Output from what File: PATIENT// PATIENT MOVEMENT    (236 entries)
Select PATIENT MOVEMENT DATE/TIME: `241  DEC 2,2014@08:40:33  ZZ PATIENT,TEST FO
UR (729010101P)
               ADMISSION:  DIRECT
Another one:
Standard Captioned Output? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields
Display Audit Trail? No//   NO

DATE/TIME: DEC 2,2014@08:40:33          TRANSACTION: ADMISSION
  PATIENT: ZZ PATIENT,TEST FOUR         TYPE OF MOVEMENT: DIRECT
  WARD LOCATION: CH 3 EAST              ROOM-BED: 300-A
  PRIMARY PHYSICIAN: VALDES,IGNACIO     DIAGNOSIS [SHORT]: Psychosis
  ADMITTING REGULATION: ACTIVE PSYCHOSIS
  ADMISSION/CHECK-IN MOVEMENT: DEC 2,2014@08:40:33
  PTF ENTRY: 80                         MAS MOVEMENT TYPE: DIRECT
  ASIH SEQUENCE: 0                      SCHEDULED ADMISSION?: NO
  FACILITY DIRECTORY EXCLUSION: NO
  FACILITY DIRECTORY TIME STAMP: DEC 2,2014@08:40:43
  FACILITY DIRECTORY USER: ADMINISTRATOR,SYSTEM
  ADMITTING CATEGORY: 0                 ENTERED BY: ADMINISTRATOR,SYSTEM
  ENTERED ON: DEC 2,2014@08:40:35       LAST EDITED BY: ADMINISTRATOR,SYSTEM
  LAST EDITED ON: DEC 2,2014@08:41:38



Select PATIENT MOVEMENT DATE/TIME: ^




Select OPTION: ENTER OR EDIT FILE ENTRIES



Input to what File: PATIENT MOVEMENT//    (236 entries)
EDIT WHICH FIELD: ALL// ADMITT
     1   ADMITTED FOR SC CONDITION?
     2   ADMITTING CATEGORY
     3   ADMITTING ELIGIBILITY
     4   ADMITTING REGULATION
CHOOSE 1-4: 2  ADMITTING CATEGORY
THEN EDIT FIELD:


Select PATIENT MOVEMENT DATE/TIME:




Select OPTION: ENTER OR EDIT FILE ENTRIES



Input to what File: PATIENT MOVEMENT//    (236 entries)
EDIT WHICH FIELD: ALL// ADMITTING
     1   ADMITTING CATEGORY
     2   ADMITTING ELIGIBILITY
     3   ADMITTING REGULATION
CHOOSE 1-3: 1  ADMITTING CATEGORY
THEN EDIT FIELD:


Select PATIENT MOVEMENT DATE/TIME:    DEC 2,2014@08:40:33  ZZ PATIENT,TEST FOUR
(729010101P)
               ADMISSION:  DIRECT
ADMITTING CATEGORY: 0// ?
     Please enter the Sharing Agreement Category.
ADMITTING CATEGORY: 0// ??
        If and entry for the Admitting Regulation exist in the Sharing Agreement
        Category file (#35.1) then the user will be prompted for the category
        associated with the Admitting Regulation.

ADMITTING CATEGORY: 0// ^


Select PATIENT MOVEMENT DATE/TIME: ^




Select OPTION: INQUIRE TO FILE ENTRIES



Output from what File: PATIENT MOVEMENT// 35.1  SHARING AGREEMENT CATEGORY
                                          (0 entries)
Select SHARING AGREEMENT CATEGORY A/P: ?
Select SHARING AGREEMENT CATEGORY A/P:



PUT IN VOL OR INVOL IN THIS ABOVE FIELD( SHARING AGREEMENT).




Select OPTION: DATA DICTIONARY UTILITIES
Select DATA DICTIONARY UTILITY OPTION: LIST FILE ATTRIBUTES
 START WITH What File: SHARING AGREEMENT CATEGORY// PATIENT MOVEMENT
                                          (236 entries)
      GO TO What File: PATIENT MOVEMENT//   (236 entries)
      Select SUB-FILE:
Select LISTING FORMAT: STANDARD//
Start with field: FIRST//
DEVICE:   TELNET
STANDARD DATA DICTIONARY #405 -- PATIENT MOVEMENT FILE       12/28/14    PAGE 1
STORED IN ^DGPM(  (236 ENTRIES)   SITE: Vista-Office EHR   UCI: EHR,EHR (VERSION
 5.3)

DATA          NAME                  GLOBAL        DATA
ELEMENT       TITLE                 LOCATION      TYPE
-------------------------------------------------------------------------------
This file holds the data for all admissions, transfers, discharges, treating
specialty changes, and lodger movements.  These entries must not be edited
through fileman.  Instead, the appropriate bed control options should be
executed to insure data consistency.

The following cross-references exist on this file:
           ^DGPM("ATID"_TT,DFN,Inverse date_AS,DA)=""
           ^DGPM("ATT"_TT,Date_AS,DA)=""
           ^DGPM("APID",DFN,Inverse Date_AS,DA)=""
           ^DGPM("APTT"_TT,DFN,Date_AS,DA)=""
           ^DGPM("APCA",DFN,Corresponding Admission,Date_AS,DA)=""
           ^DGPM("APMV",DFN,Corresponding Admission,Inverse Date_AS,DA)=""
           ^DGPM("APRD",DFN,Date_AS,DA)=""
           ^DGPM("AMV"_TT,Date_AS,DFN,DA)=""
           ^DGPM("ATS",DFN,Corresponding Admission,Inverse Date_AS,Treating
STANDARD DATA DICTIONARY #405 -- PATIENT MOVEMENT FILE       12/28/14    PAGE 2
STORED IN ^DGPM(  (236 ENTRIES)   SITE: Vista-Office EHR   UCI: EHR,EHR (VERSION
 5.3)

DATA          NAME                  GLOBAL        DATA
ELEMENT       TITLE                 LOCATION      TYPE
-------------------------------------------------------------------------------
Specialty,DA)=""
           ^DGPM("CN",External Format of Ward,DA)=""       **inpatients only**
           ^DGPM("LD",External Format of Ward,DA)=""       **lodgers only**
           ^DGPM("ARM",IFN of Room-bed,DA)=1 or 0          [1 indicates lodger,
0 indicates non-lodger]
           ^DGPM("B",Date,DA)=""
           ^DGPM("C",DFN,DA)=""
           ^DGPM("CA",Corresponding Admission,DA)=""

where:     TT=Transaction type where choices are as follows:
                1=admission          4=check-in lodger
                2=transfer           5=check-out lodger
                3=discharge          6=specialty change

           AS=ASIH Sequencewhere choices are as follows:
STANDARD DATA DICTIONARY #405 -- PATIENT MOVEMENT FILE       12/28/14    PAGE 3
STORED IN ^DGPM(  (236 ENTRIES)   SITE: Vista-Office EHR   UCI: EHR,EHR (VERSION
 5.3)

DATA          NAME                  GLOBAL        DATA
ELEMENT       TITLE                 LOCATION      TYPE
-------------------------------------------------------------------------------
                1=transfer to hospital ASIH
                2=Admission to hospital (automatically generated by module)
           or  1=discharge from hospitalwithin 30 days of ASIH stay
                2=transfer to or discharge from NHCU/DOM (automatically
generated by module)
           [NOTE:  This value is 0 for non-ASIH movements or ASIH movements
where there are not 2 movements at the same date/time]



COMPILED CROSS-REFERENCE ROUTINE: DGPMXX
              DD ACCESS: @
              RD ACCESS: d
              WR ACCESS: @
             DEL ACCESS: @
           LAYGO ACCESS: @
IDENTIFIED BY: TRANSACTION (#.02)[R], PATIENT (#.03)[R],
               TYPE OF MOVEMENT (#.04)[R],
               ADMISSION/CHECK-IN MOVEMENT (#.14)[R]
%GTM-I-CTRLC, CTRL_C encountered

LOOK FOR ADMISSION LIST IN THIS CROSS REFERENCE BACK TO A CERTAIN DATE 
AS EARLIEST DATE OF ADMISSION.

ASTRON>D ^%G

Output device: <terminal>:

List ^^DGPM("AMV1",*)
^DGPM("AMV1",3100101.09,1,40)=""
^DGPM("AMV1",3100101.09,2,46)=""
^DGPM("AMV1",3100110.09,1,43)=""
^DGPM("AMV1",3100110.09,66,49)=""
^DGPM("AMV1",3100115.09,1,51)=""
^DGPM("AMV1",3100120.09,94,59)=""
^DGPM("AMV1",3100201.09,41,33)=""
^DGPM("AMV1",3100220.13,124,117)=""
^DGPM("AMV1",3100301.09,96,62)=""
^DGPM("AMV1",3100401.09,1,87)=""
^DGPM("AMV1",3100405.1,97,66)=""
^DGPM("AMV1",3100501.09,76,90)=""
^DGPM("AMV1",3100501.09,100,84)=""
^DGPM("AMV1",3100601.11,95,72)=""
^DGPM("AMV1",3100901.09,98,75)=""
^DGPM("AMV1",3110502.09,125,193)=""
^DGPM("AMV1",3110506.09,85,37)=""
^DGPM("AMV1",3110506.09,145,188)=""
^DGPM("AMV1",3110511.17,90,29)=""
^DGPM("AMV1",3110512.09,3,13)=""
^DGPM("AMV1",3110512.09,20,9)=""
^DGPM("AMV1",3110512.09,123,195)=""
^DGPM("AMV1",3110512.163504,91,1)=""
^DGPM("AMV1",3110512.2,83,23)=""
^DGPM("AMV1",3110515.09,91,27)=""
^DGPM("AMV1",3110515.124215,5,15)=""
^DGPM("AMV1",3110515.141627,7,17)=""
^DGPM("AMV1",3110515.143849,8,21)=""
^DGPM("AMV1",3110515.14435,92,25)=""
^DGPM("AMV1",3110517.09,150,120)=""
^DGPM("AMV1",3110519.09,107,155)=""
^DGPM("AMV1",3110519.1,97,69)=""
^DGPM("AMV1",3110519.205017,73,31)=""
^DGPM("AMV1",3110521.09,103,186)=""
^DGPM("AMV1",3110525.11,147,197)=""
^DGPM("AMV1",3110527.09,146,202)=""
^DGPM("AMV1",3110527.190952,73,57)=""
^DGPM("AMV1",3110529.182459,52,78)=""
^DGPM("AMV1",3110529.222257,68,80)=""
^DGPM("AMV1",3110530.185041,25,82)=""
^DGPM("AMV1",3110531.08,144,184)=""
^DGPM("AMV1",3110531.08,149,164)=""
^DGPM("AMV1",3110531.1,129,160)=""
^DGPM("AMV1",3110531.200054,15,93)=""
^DGPM("AMV1",3110531.20043,19,95)=""
^DGPM("AMV1",3110531.20054,22,97)=""
^DGPM("AMV1",3110531.200629,24,99)=""
^DGPM("AMV1",3110531.200747,34,101)=""
^DGPM("AMV1",3110531.20084,36,103)=""
^DGPM("AMV1",3110531.201117,39,105)=""
^DGPM("AMV1",3110531.201226,41,107)=""
^DGPM("AMV1",3110531.201316,53,109)=""
^DGPM("AMV1",3110531.201544,67,111)=""
^DGPM("AMV1",3110531.201634,70,113)=""
^DGPM("AMV1",3110531.20182,54,115)=""
^DGPM("AMV1",3110601.09,120,126)=""
^DGPM("AMV1",3110604.1,111,146)=""
^DGPM("AMV1",3110605.11,130,166)=""
^DGPM("AMV1",3110606.08,141,140)=""
^DGPM("AMV1",3110607.09,127,129)=""
^DGPM("AMV1",3110608.093,134,152)=""
^DGPM("AMV1",3110608.1,135,122)=""
^DGPM("AMV1",3110608.11,128,143)=""
^DGPM("AMV1",3110610.09,106,134)=""
^DGPM("AMV1",3110610.09,110,158)=""
^DGPM("AMV1",3110610.14,131,168)=""
^DGPM("AMV1",3110611.1,88,138)=""
^DGPM("AMV1",3110611.11,133,149)=""
^DGPM("AMV1",3110613.124423,5,132)=""
^DGPM("AMV1",3110618.16,109,177)=""
^DGPM("AMV1",3110619.11,113,175)=""
^DGPM("AMV1",3110620.03,138,179)=""
^DGPM("AMV1",3110620.062907,1,173)=""
^DGPM("AMV1",3110621.05,122,205)=""
^DGPM("AMV1",3131123.234136,181,209)=""
^DGPM("AMV1",3141130.235035,1838,235)=""
^DGPM("AMV1",3141201.11061,1734,238)=""
^DGPM("AMV1",3141202.084033,622,241)=""

List ^

USE FOR AWARE FOR FILTERING BELOE EXAMPLE AND MAYBE FOR ADMISSIONS BELOW WITH 
EXTERNAL/EXTRACTION ROUTINE


Output from what File: HEALTH SUMMARY COMPONENT//   (109 entries)
Sort by: NAME//
Start with NAME: FIRST// A
Go to NAME: LAST// Z
  Within NAME, Sort by:
First Print FIELD: NAME
Then Print FIELD: EXTRACT??
Then Print FIELD: EXTERNAL/EXTRACT ROUTINE    (multiple)
  Then Print EXTERNAL/EXTRACT ROUTINE SUB-FIELD: ?
    Answer with EXTERNAL/EXTRACT ROUTINE SUB-FIELD NUMBER, or LABEL:
   .01          EXTERNAL/EXTRACT ROUTINE

Type '&' in front of field name to get TOTAL for that field.
     '!' to get COUNT.   '+' to get TOTAL & COUNT.    '#' to get MAX & MIN.
     ']' to force SAVING PRINT TEMPLATE
You can follow field name with ';' and FORMAT SPECIFICATION.
  Then Print EXTERNAL/EXTRACT ROUTINE SUB-FIELD: .01  EXTERNAL/EXTRACT ROUTINE
  Then Print EXTERNAL/EXTRACT ROUTINE SUB-FIELD:
Then Print FIELD:
Heading (S/C): HEALTH SUMMARY COMPONENT List  Replace
START at PAGE: 1//
DEVICE:   TELNET
HEALTH SUMMARY COMPONENT List                         DEC 28,2014@14:43   PAGE 1
NAME                            EXTERNAL/EXTRACT ROUTINE
--------------------------------------------------------------------------------

ADVANCE DIRECTIVE
ADVER/ALLERG/ACTIVE DET
ADVERSE REACTIONS/ALLERG BRIEF  EN1;C0QGMRAD
ADVERSE REACTIONS/ALLERGIES     EN1;C0QGMRAD
ADVERSE RXN/ALLERGY ACTIVE      ALLRGP;C0QGMTSG
Active/Pending/Expired Meds
CLINICAL REMINDERS BRIEF        MAIN;PXRM(DFN,SEG,FLG)
CLINICAL REMINDERS DUE
CLINICAL REMINDERS FINDINGS     MAIN;PXRM(DFN,SEG,FLG)
CLINICAL REMINDERS LAST DONE    MAIN;PXRM(DFN,SEG,FLG)
CLINICAL REMINDERS MAINTENANCE
CLINICAL REMINDERS SUMMARY
CLINICAL WARNINGS
COMPENSATION AND PENSION EXAMS
CONSULTS BRIEF                  MAIN;GMTSCNB
CRISIS NOTES
HEALTH SUMMARY COMPONENT List                         DEC 28,2014@14:43   PAGE 2
NAME                            EXTERNAL/EXTRACT ROUTINE
--------------------------------------------------------------------------------

DIETETICS
DISCHARGE SUMMARY
DISCHARGE SUMMARY BRIEF
GEC Completed Referral Count
GEC Health Factor Category      HF;PXRHS07(DFN,END,BEG,NUM,.GMTSARY)
GLOBAL ASSESSMENT FUNCTIONING   GAFHX;YSGAFAPI
IMAGING IMPRESSION
IMAGING IMPRESSION SELECTED
IMAGING PROFILE
IMAGING STATUS
LAB BLOOD AVAILABILITY
LAB BLOOD TRANSFUSIONS
LAB CHEMISTRY & HEMATOLOGY
LAB CUMULATIVE SELECTED
LAB CUMULATIVE SELECTED 1
LAB CUMULATIVE SELECTED 2
HEALTH SUMMARY COMPONENT List                         DEC 28,2014@14:43   PAGE 3
NAME                            EXTERNAL/EXTRACT ROUTINE
--------------------------------------------------------------------------------

LAB CUMULATIVE SELECTED 3
LAB CUMULATIVE SELECTED 4
LAB CYTOPATHOLOGY
LAB ELECTRON MICROSCOPY
LAB MICROBIOLOGY
LAB MICROBIOLOGY BRIEF
LAB ORDERS
LAB ORDERS BRIEF
LAB SURGICAL PATHOLOGY
LAB TESTS SELECTED
MAG IMAGING
MAS ADMISSIONS/DISCHARGES
MAS ADT HISTORY
MAS ADT HISTORY EXPANDED
MAS CLINIC VISITS FUTURE
MAS CLINIC VISITS PAST
HEALTH SUMMARY COMPONENT List                         DEC 28,2014@14:43   PAGE 4
NAME                            EXTERNAL/EXTRACT ROUTINE
--------------------------------------------------------------------------------

MAS DEMOGRAPHICS
MAS DEMOGRAPHICS BRIEF
MAS DISABILITIES
MAS DISCHARGE DIAGNOSIS
MAS DISCHARGES
MAS PROCEDURES ICD CODES
MAS SURGERIES ICD CODES
MAS TRANSFERS
MAS TREATING SPECIALTY
MEDICINE ABNORMAL BRIEF
MEDICINE BRIEF REPORT
MEDICINE FULL CAPTIONED
MEDICINE FULL REPORT
MEDICINE SUMMARY
MENTAL HEALTH PHYSICAL EXAM
MHA Administration List
HEALTH SUMMARY COMPONENT List                         DEC 28,2014@14:43   PAGE 5
NAME                            EXTERNAL/EXTRACT ROUTINE
--------------------------------------------------------------------------------

MHA Score
MHV REMINDERS DETAIL DISPLAY
MHV REMINDERS SUMMARY DISPLAY
Medication Reconciliation
Medication Worksheet
NEXT OF KIN                     NOKC;GMTSDEM2
NON VA MEDICATIONS              PSOHCSUM
ONCOLOGY
ORDERS CURRENT
PCE EDUCATION
PCE EDUCATION LATEST
PCE EXAMS LATEST
PCE HEALTH FACTORS ALL
PCE HEALTH FACTORS SELECTED
PCE IMMUNIZATIONS
PCE LOCATION OF HOME
HEALTH SUMMARY COMPONENT List                         DEC 28,2014@14:43   PAGE 6
NAME                            EXTERNAL/EXTRACT ROUTINE
--------------------------------------------------------------------------------

PCE OUTPATIENT DIAGNOSIS
PCE OUTPATIENT ENCOUNTERS
PCE SKIN TESTS
PCE TREATMENTS PROVIDED
PHARMACY INTRAVENOUS
PHARMACY OUTPATIENT
PHARMACY UNIT DOSE
PROBLEM LIST ACTIVE
PROBLEM LIST ALL
PROBLEM LIST INACTIVE
PROGRESS NOTES
PROGRESS NOTES BRIEF
PROGRESS NOTES SELECTED
Remote Active Medications
Remote Allergy/ADR Data
SOCIAL WORK
HEALTH SUMMARY COMPONENT List                         DEC 28,2014@14:43   PAGE 7
NAME                            EXTERNAL/EXTRACT ROUTINE
--------------------------------------------------------------------------------

SPINAL CORD DYSFUNCTION
SURGERY NON OR PROCEDURES
SURGERY ONLY REPORTS
SURGERY REPORTS
SURGERY REPORTS BRIEF
SURGERY SEL NON OR PROCEDURES
VEFA HOSPITAL ALL PAT CENSUS
VITAL SIGNS                     EN1;GMVHS
VITAL SIGNS DETAILED DISPLAY    EN1;GMVHS
VITAL SIGNS OUTPATIENT          EN1;GMVHS
VITAL SIGNS SELECTED            EN1;GMVHS
VITAL SIGNS SELECTED OUTPAT.


Press RETURN to continue...


          Enter or Edit File Entries
          Print File Entries
          Search File Entries
          Modify File Attributes
          Inquire to File Entries
          Utility Functions ...
          Data Dictionary Utilities ...
          Transfer Entries
          Other Options ...

Select VA FileMan Option:


GMTSUP  CONTAINS COMPONENT HEADER AND HS HEADER 

GMTSUP ; SLC/KER - Utilities for Paging HS           ; 01/06/2003
 ;;2.7;Health Summary;**2,7,21,27,28,30,35,47,56,58,85**;Oct 20, 1995;Build 24
 ;
 ; External References
 ;   DBIA 10026  ^DIR
 ;   DBIA    82  EN^XQORM
 ;                       
CKP ; Check page position, pause and prompt
 Q:$D(GMTSQIT)  S GMTSNPG=0
 K:$L($G(GMTSOBJ("LABEL"))) GMTSOBJ("REPORT HEADER")
 I $G(GMTSWRIT)=1 D BREAK S GMTSWRIT=0
 I +($$HF^GMTSU) D BREAK:(GMTSEGN'=$G(GMTSLCMP)) Q
 Q:+$G(GMTSLPG)'>0&($Y'>(IOSL-GMTSLO))
 I $E(IOST,1)="C" S:'$D(GMTSTOF) GMTSTOF=1 D CKP1
 I '$D(GMTSQIT) W @IOF D HEADER,BREAK S GMTSNPG=1,GMTSTOF=GMTSEGN
 I $D(GMTSQIT),(GMTSQIT]""),($D(GMTSTYP)) W @IOF D HEADER S GMTSTOF=GMTSEGN
 Q
CKP1 ; Help Display of Optional Components for Navigation
 N DA,I,J,K,L,X,XQORM,Y,GMTSY,TYP,DIC
 I $S('$D(GMTSTYP):1,$D(GMTOPT):1,1:0) N DIR S DIR(0)="E" D ^DIR K DIR S:$D(DUOUT)!(GMTSLPG) GMTSQIT="" Q
 S TYP=GMTSTYP
 S DIC=142,DIC(0)="MZF",X="GMTS HS ADHOC OPTION" S Y=$$TYPE^GMTSULT
 S GMTSTYP=+Y K DIC,X,Y
 S XQORM=GMTSTYP_";GMT(142,",XQORM(0)="1AF\+",XQORM("A")="Press <RET> to continue, ^ to exit, or select component: "
 S XQORM("??")="D HELP^GMTSUP1" I GMTSLPG,'$D(GMTSOBJ) W:'$D(GMTSOBJE) "* END * "
 S XQORM("S")="I $D(^GMT(142,DA(1),1,DA,0)),($P(^GMT(142.1,$P(^GMT(142,DA(1),1,DA,0),U,2),0),U,6)'=""T"")"
 D EN^XQORM W ! D @$S(Y=1:"BRNCH",1:"EVAL")
 I $D(GMTSY),(GMTSY=0) K GMTSY G CKP1
 S GMTSTYP=TYP
 Q
BREAK ; Writes the Component Header
 ;           
 ;   If the variable GMTSOBJ exist, then the 
 ;   Component Headers are suppressed with the
 ;   following exceptions:
 ;           
 ;       If GMTSOBJ("COMPONENT HEADER") exist,
 ;       then the Component Header will NOT be
 ;       suppressed
 ;           
 ;       If GMTSOBJ("BLANK LINE") exist, a blank
 ;       line will be written after the Component
 ;       Header
 ;              
 N GMTSM,GMTSF S GMTSM=$$MUL,GMTSF=$$FST
 I +GMTSM=0,$D(GMTSOBJ),'$D(GMTSOBJ("COMPONENT HEADER")),'$D(GMTSOBJ("BLANK LINE")) Q
 N GMTS,GMTSUL,GMTSL S:'$D(GMTSLCMP) GMTSLCMP=0
 S GMTSUL="",GMTSNPG=1,GMTS=$$CHDR,GMTSL=+($L($G(GMTS))),$P(GMTSUL,"-",+GMTSL)="-"
 I $Y'>(IOSL-GMTSLO)!(+($$HF^GMTSU)) D
 . I $D(GMTSOBJ) D  Q
 . . S GMTSLCMP=GMTSEGN
 . . I +($G(GMTSM))>0!($D(GMTSOBJ("COMPONENT HEADER"))) D
 . . . W:+GMTSF=0 ! W !,GMTS W:$D(GMTSOBJ("UNDERLINE")) !,GMTSUL
 . . . W ! W:$D(GMTSOBJ("BLANK LINE")) !
 . W !,GMTS,!
 . W:$Y'>(IOSL-GMTSLO) ?34,$S(GMTSEGN=GMTSLCMP:"(continued)",1:""),!
 . S GMTSLCMP=GMTSEGN
 Q
OLDB ;
 S:'$D(GMTSLCMP) GMTSLCMP=0
 S GMTS="",GMTSNPG=1
 S $P(GMTS,"-",79-$L(GMTSEGH_GMTSEGL)/2)=""
 S GMTS=GMTS_" "_GMTSEGH_GMTSEGL_" "_GMTS
 I $Y'>(IOSL-GMTSLO)!(+($$HF^GMTSU)) D
 . W !,GMTS,!
 . W:$Y'>(IOSL-GMTSLO) ?34,$S(GMTSEGN=GMTSLCMP:"(continued)",1:""),!
 . S GMTSLCMP=GMTSEGN
        Q
HEADER ; Print Running Header
 ;           
 ;   If the variable GMTSOBJ exist, then the 
 ;   Report Headers are suppressed with the 
 ;   following exceptions:
 ;           
 ;       If GMTSOBJ("DATE LINE") exist, then the
 ;       Location/Report Date line will NOT be
 ;       suppressed.
 ;           
 ;       If GMTSOBJ("CONFIDENTIAL") exist, then
 ;       the Confidential Header Name line will
 ;       NOT be suppressed.
 ;           
 ;       If GMTSOBJ("REPORT HEADER") exist, then
 ;       the Report Header containing the patient's
 ;       name, SSAN, ward and DOB will NOT be
 ;       suppressed.
 ;              
 ;       If the variable GMTSOBJ("LABEL") contains
 ;       text, and the variable GMTSOBJ("USE LABEL")
 ;       exist, then this text will be printed before
 ;       the object text.
 ;                 
 ;       If GMTSOBJ("REPORT DECEASED") exist, then
 ;       the optional line that displays for Deceased
 ;       patients will NOT be suppressed.
 ;                 
 ;   Header Lines:
 N GMTSVDT,DATA S DATA="" I +$G(GMTSPXD1)&+$G(GMTSPXD2) D
 . Q:$G(GMTSOBJ)  S:'$D(GMTSOBJE) DATA="Printed for data "  S:$D(GMTSOBJE) DATA="Include data "
 . I GMTSPXD1=GMTSPXD2 S DATA=DATA_"on "_GMTSPXD1 Q
 . S DATA=DATA_"from "_GMTSPXD2_" to "_GMTSPXD1
 I $D(GMTSCDT(0)),'$D(GMTSOBJ) S GMTSVDT=GMTSCDT(0) S:GMTSDTM'["Printed:" GMTSDTM="Printed: "_GMTSDTM
 ;     Location and Date of Report
 I '$D(GMTSOBJ)!($D(GMTSOBJ("DATE LINE"))) D
 . N GMTSLOC S GMTSLOC=$S('$D(GMTSOBJ("DATE LINE")):$P($G(GMTSSC),U,2),1:"")
 . W !,$S($L(GMTSLOC):"Location: "_GMTSLOC_" ",1:"")
 . W $S($D(GMTSVDT):GMTSVDT,1:"")
 . W:'$D(GMTSOBJ("DATE LINE")) DATA,?(79-$L(GMTSDTM)),GMTSDTM
 . W:$D(GMTSOBJ("DATE LINE")) DATA,?(74-$L(GMTSDTM)),GMTSDTM
 ;     Confidential Header Name
 S:'$D(GMTSPG) GMTSPG=0
 S GMTSPG=GMTSPG+1,GMTSHDR=" CONFIDENTIAL "_GMTSTITL_" SUMMARY "
 S GMTSHDR=GMTSHDR_$S($E(IOST,1)="C":"",1:"  pg. "_GMTSPG)
 S GMTS="" S:'$D(GMTSOBJ) $P(GMTS,"*",(77-$L(GMTSHDR))\2)="*"
 S:$D(GMTSOBJ) $P(GMTS,"*",(72-$L(GMTSHDR))\2)="*"
 S GMTSHDR=GMTS_" "_GMTSHDR_" "_GMTS
 I '$D(GMTSOBJ)!($D(GMTSOBJ("CONFIDENTIAL"))) W !,GMTSHDR,"*"
 ;     Name, SSAN, Ward, DOB
 I '$D(GMTSLFG) D
 .I $G(GMTSTITL)'["AD HOC",($G(GMTSTITL)'["PDX"),($G(HSTAG)="") D EN^GMTSHCPR  ;GMTS,85 restrict ssn/dob on HS Type hard copies 
 . I $G(GMTSPHDR("TWO")) D
 . . I $D(GMTSOBJ),'$D(GMTSOBJ("REPORT HEADER")),$L($G(GMTSOBJ("LABEL"))) D LABEL
 . . I $D(GMTSOBJ),'$D(GMTSOBJ("REPORT HEADER")) Q
 . . W !,GMTSPHDR("NMSSN"),?GMTSPHDR("DOBS"),GMTSPHDR("DOB")
 . . W !,?GMTSPHDR("WARDRBS"),GMTSPHDR("WARDRB")
 . E  D
 . . I $D(GMTSOBJ),'$D(GMTSOBJ("REPORT HEADER")),$L($G(GMTSOBJ("LABEL"))) D LABEL
 . . I $D(GMTSOBJ),'$D(GMTSOBJ("REPORT HEADER")) Q
 . . W !,GMTSPHDR("NMSSN"),?GMTSPHDR("WARDRBS")
 . . W GMTSPHDR("WARDRB"),?GMTSPHDR("DOBS"),GMTSPHDR("DOB")
 ;     Deceased
 ;                    
 I '$D(GMTSOBJ)!($D(GMTSOBJ("DECEASED"))) D
 . W:+$G(VADM(6)) !,?26,"** DECEASED   "_$P(VADM(6),U,2)_" **"
 W:'$D(GMTSOBJ) !
 Q
BRNCH ; Checks abbreviation to branch to a different component
 N GMTINX,LIM,CREC,SBS
 I Y,("+-"[X) S:X="-" GMTSEGN=GMTSTOF-1 S (GMTSY,GMTSQIT)=1,GMTSLPG=0 Q
 I X="^^" S DIROUT=1,GMTSQIT="" Q
 I Y,(X?1"^^".E) Q
 S GMTINX=$S($D(^GMT(142,GMTSTYP,1,+Y(1),0)):$P(^(0),U,2),1:"")
 I 'GMTINX S GMTSY=0 Q
 I '$D(GMTSEGI(GMTINX)) N GMI,GMJ,GMTSDFLT S GMI=1,GMJ=GMTSEGC,GMTSDFLT=1 D LOAD^GMTSADH S GMTSEGC=GMTSEGC+1
 I '$D(GMTSEGI(GMTINX)) S GMTINX="",GMTSY=0 Q
 S LIM=$P(Y(1),U,4) I LIM'["=" G NOLIM
 S CREC=^GMT(142.1,GMTINX,0),SBS=GMTSEGI(GMTINX) D CMPLIM^GMTSADH2
 I $D(DIROUT) S GMTSQIT="" Q
NOLIM ; No limits
 S GMTSEGN=GMTSEGI(GMTINX)-1,(GMTSY,GMTSQIT)=1,GMTSLPG=0
 Q
 ;
EVAL ; Evaluate input to determine quit or continue
 Q:'$D(X)
 S:$D(GMTSEXIT) GMTSEXIT=$G(X)
 S:$D(DTOUT) DIROUT=1 I $S(X="^^":1,GMTSLPG:1,$D(DIROUT):1,X="^":1,1:0) S GMTSQIT=""
 I +$G(GMPSAP),(X="^") S GMDUOUT=1
 Q
MUL(X) ; Multiple Components in Type
 N GMTSF,GMTSL S GMTSF=$O(GMTSEG(0)),GMTSL=$O(GMTSEG(" "),-1)
 Q:+GMTSF=+GMTSL 0  Q 1
FST(X) ; First Component in Type
 N GMTSF,GMTSL S GMTSF=$O(GMTSEG(0)),GMTSL=+($G(GMTSEGN))
 Q:+GMTSF=+GMTSL 1  Q 0
CHDR(X) ; Component Header
 N GMTSN,GMTSH,GMTSL,GMTS S GMTSN=$$CNAM,GMTSH=$G(GMTSEGH)
 S GMTSL=$G(GMTSEGL),GMTS="",$P(GMTS,"-",79-$L(GMTSH_GMTSL)/2)=""
 S X=GMTS_" "_GMTSH_GMTSL_" "_GMTS Q:'$D(GMTSOBJ) X
 S:$L(GMTSH)&($D(GMTSOBJ("COMPONENT HEADER"))) GMTSN=GMTSH
 S:$L(GMTSL)&($L(GMTSN))&($D(GMTSOBJ("LIMITS"))) GMTSN=GMTSN_" "_GMTSL
 S X=GMTSN Q X
CNAM(X) ; Component Name
 N GMTSH S GMTSH=+($P($G(GMTSEG(+($G(GMTSEGN)))),"^",2))
 S X=$P($G(^GMT(142.1,+GMTSH,0)),"^",1) Q X
LABEL ; Label
 Q:'$D(GMTSOBJ("USE LABEL"))  N LABEL S LABEL=$G(GMTSOBJ("LABEL"))
 W !,LABEL W:$L(LABEL) ! W:$D(GMTSOBJ("LABEL BLANK LINE")) !
 Q
LABDAT ; Label/Date
 Q:'$D(GMTSOBJ("USE LABEL"))  N LABEL S LABEL=$G(GMTSOBJ("LABEL"))
 I '$D(GMTSOBJ("DATE LINE")),$D(GMTSOBJ("LABEL")),$L(LABEL),$L($G(GMTSDTM)) S LABEL=LABEL_$J("",((79-$L(GMTSDTM))-$L(LABEL)))_GMTSDTM
 I '$D(GMTSOBJ("DATE LINE")),$D(GMTSOBJ("LABEL")),'$L(LABEL),$L($G(GMTSDTM)) S LABEL="Information as of "_$G(GMTSDTM)
 W !,LABEL W:$L(LABEL) ! W:$D(GMTSOBJ("LABEL BLANK LINE")) !
 Q



GMTSU CONTAINS DEMOGRAPHICS

GMTSU ; SLC/JER,KER/NDBI - Health Summary Utilities ; 08/27/2002
 ;;2.7;Health Summary;**27,28,31,35,37,43,47,56**;Oct 20, 1995
 ;
 ; External References
 ;   DBIA 10096  ^%ZOSF("TEST")
 ;   DBIA  2934  ^A7RCP (NDBI Global)
 ;   DBIA 10103  $$FMTE^XLFDT
 ;   DBIA 10103  $$FMTHL7^XLFDT
 ;   DBIA 10103  $$HL7TFM^XLFDT
 ;   DBIA 10061  OERR^VADPT
 ;   DBIA 10104  $$UP^XLFSTR
 ;   DBIA 10026  ^DIR
 ;   DBIA  2052  FILE^DID
 ;   DBIA 10022  %XY^%RCR
 ;   DBIA  2055  $$VFIELD^DILFD
 ;   DBIA  2052  $$GET1^DID
 ;                              
PROK(X,Y) ; Routine and Patch # OK (in UCI)
 N GMTS,GMTSI,GMTSO S X=$G(X),Y=$G(Y) Q:'$L(X) 0 Q:Y'=""&(+Y=0)
 S Y=+Y,GMTS=$$ROK(X) Q:'GMTS 0 Q:+Y=0 1 S GMTSO=0,GMTS=$T(@("+2^"_X)),GMTS=$P($P(GMTS,"**",2),"**",1)
 F GMTSI=1:1:$L(GMTS,",") S:+($P(GMTS,",",GMTSI))=Y GMTSO=1 Q:GMTSO=1
 S X=GMTSO Q X
ROK(X) ; Routine OK (in UCI) (NDBI)
 S X=$G(X) Q:'$L(X) 0  Q:$L(X)>8 0  X ^%ZOSF("TEST") Q:$T 1  Q 0
NDBI(X) ; National Database Integration site 1 = yes  0 = no
 N R,G S X="A7RDUP" X ^%ZOSF("TEST") S R=$T,G=$S($D(^A7RCP):1,1:0),X=R+G,X=$S(X=2:1,1:0) Q X
 ;                
CPT(X) ; Use CPT Modifiers  Needs GMTSEG Array
 S X=+($G(X)) N GMTSN,GMTSC,GMTSM,GMTSA,GMTSI S GMTSN=$G(GMTSEG(X)) S GMTSC=+($P(GMTSN,"^",2)) Q:'GMTSC 0
 S GMTSM=$S($P(GMTSN,"^",9)="N":0,$P(GMTSN,"^",9)="":1,1:1) Q:'GMTSM 0
 S GMTSA=$S(+($$CMU(+GMTSC))>0:1,1:0) Q:'GMTSA 0
 Q 1
CMU(X) ; Component Uses CPT Modifiers
 N GMTSA,GMTSN,GMTSI S X=$G(X) Q:'$L(X) 0 S GMTSI=+X,GMTSA=$O(^GMT(142.1,"C",X,0)),GMTSN=$O(^GMT(142.1,"D",X,0)) S:GMTSI=0&(+GMTSA>0) GMTSI=GMTSA S:GMTSI=0&(+GMTSN>0) GMTSI=GMTSN
 Q:+GMTSI=0 0 S GMTSA=$S($P($G(^GMT(142.1,+GMTSI,0)),"^",14)="Y":1,1:0) Q:'GMTSA 0
 Q 1
 ;            
 ; Dates and Time
ED(X) ;   Health Summary External Date
 S X=$G(X) Q:'$L(X) ""  D REGDT4 Q X
EDT(X) ;   Health Summary External Date and Time
 S X=$G(X) Q:'$L(X) ""  D REGDTM4 Q X
REGDT ;   Receives X FM date and returns X in MM/DD/YY format
 S X=$TR($$FMTE^XLFDT(X,"2DZ"),"@"," ") Q
REGDT4 ;   Receives X FM date and returns X in MM/DD/YYYY format
 S X=$TR($$FMTE^XLFDT(X,"5DZ"),"@"," ") Q
REGDTM ;   Receives X FM date and returns X in MM/DD/YY TT:TT
 S X=$TR($$FMTE^XLFDT(X,"2ZM"),"@"," ") Q
REGDTM4 ;   Receives X FM date and returns X in MM/DD/YYYY TT:TT
 S X=$TR($$FMTE^XLFDT(X,"5ZM"),"@"," ") Q
SIDT ;   Receives X FM date and returns X in DD MMM YY
 N MON,MM S X=$P(X,".") S:'X X="" Q:'$L(X)
 S MON="JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC"
 S MM=$E(X,4,5),MM=$S(MM:$P(MON,U,+MM),1:"")
 S X=$E(X,6,7)_" "_MM_" "_$E(X,2,3) Q
MTIM ;   Convert Time from X=2890313.1304 to X=13:04
 S X=$P(X,".",2) Q:'$L(X)  S X=$S(X:$E(X,1,2)_$E("00",0,2-$L($E(X,1,2)))_":"_$E(X,3,4)_$E("00",0,2-$L($E(X,3,4))),1:"")
 Q
 ;            
HF(X) ; Host File - Used to distinguish from Host Files that
 ; are intended for Printers and Host Files for other
 ; purposes (windows/files)
 ;                
 ;   1 - if Device Type is HFS and not a TCP/IP Printer
 ;   0 - if Device Type is not HFS or device is a Printer
 ;            
 ; Check Device
 ;   Check Host File Server
 Q:$G(IOT)'="HFS" 0
 ;   Check ORWINDEV (Post OR*3.0*85)
 N GMTS85 S GMTS85=$$PROK("ORWRP",85)
 Q:+($G(GMTS85))>0&(+($G(ORWINDEV))>0) 0
 ;   Host File for GUI Scrollable Window
 Q:$E($G(ION),1,14)["OR WORKSTATION" 1
 ;   TCP/IP Printer
 Q:$G(IO)["$PRT"!($G(IO)["PRN|") 0
 ;   Windows Printer
 Q:$E($G(ION),1,14)["OR WINDOWS HFS" 0
 ;   Host Files (file or unspecifed printer)
 S X=0 S:$G(ION)["HOST FILE" X=1
 S:$E($G(IOST),1,5)["P-OTH" X=1
 Q X
 ;            
FMHL7DTM ; Convert X - int date/time to HL7 CCYYMMDDHHMM-HHHH
 S X=$$FMTHL7^XLFDT(+($G(X))) Q
HL7FMDTM ; Convert X - HL7 CCYYMMDDHHMM-HHHH to int date/time local
 S X=$$HL7TFM^XLFDT($G(X),"L") Q
 ;            
DEM ; Gets Demographic Data from VADPT
 ;            
 ;    Input    DFN
 ;            
 ;    Output   GMTSPNM     Patient Name
 ;             GMTSSN      Social Security Number
 ;             GMTSDOB     Date of Birth
 ;             SEX         Sex
 ;             GMTSWARD    Ward
 ;             GMTSRB      Bed
 ;             GMTSAGE     Age
 ;             VADM()      Demographic Array
 ;             VAIN()      Inpatient Array
 ;             GMTSPHDR()  Report Header Array
 ;            
 K VAHOW D OERR^VADPT S GMTSPNM=VADM(1),GMTSSN=$S($D(VA("PID")):VA("PID"),1:$P(VADM(2),"^",2))
 S GMTSAGE=$S(+VADM(4)>0:+VADM(4),1:99),SEX=$P(VADM(5),"^")
 S GMTSWARD=$P(VAIN(4),"^",2),GMTSRB=VAIN(5)
 S X=$P(VADM(3),"^") D REGDT4 S GMTSDOB=X K VA,GMTSPHDR N DOB,LWARDRB,NMSSN,NMSSNE,WARDRB,WARDRBE,WARDRBS
 S NMSSN=GMTSPNM_"    "_GMTSSN,NMSSNE=$L(NMSSN)+2,WARDRB=GMTSWARD_" "_GMTSRB
 S LWARDRB=$L(WARDRB),WARDRBS=40-(LWARDRB/2),WARDRBE=WARDRBS+LWARDRB
 S DOB="DOB: "_GMTSDOB,GMTSPHDR("NMSSN")=NMSSN,GMTSPHDR("WARDRB")=WARDRB
 S GMTSPHDR("WARDRBS")=WARDRBS,GMTSPHDR("DOB")=DOB,GMTSPHDR("DOBS")=64
 I (NMSSNE'<WARDRBS)!(WARDRBE'<64) S GMTSPHDR("TWO")=1
 Q
 ;                 
NAME(X,Y,L) ; Format name
 ;            
 ; Input 
 ;    X    Internal Entry Number of NEW PERSON file 200
 ;    Y    Flag to specify the first name format
 ;            0 for First Name Initial (only)
 ;            1 for First Name
 ;    L    Maximum Length of Name
 ;          
 ; Output  Last,First (name/initial) to specified length
 ;            
 N RAWNM,LAST,FIRST,ALPHA,PSN,CH,IEN,FNF,LEN
 S IEN=+($G(X)),FNF=+($G(Y)),LEN=+($G(L))
 S RAWNM=$$UNAM^GMTSU2(+IEN) S:LEN=0 LEN=$L(RAWNM)
 S RAWNM=$S($L(RAWNM):RAWNM,1:"UNKNOWN")
 S LAST=$P(RAWNM,","),FIRST=$P(RAWNM,",",2),ALPHA=0
 I $L(FIRST) D
 . F PSN=1:1 S CH=$E(FIRST,PSN) Q:CH=""  S:CH?1A ALPHA=PSN Q:ALPHA>0
 S:ALPHA>0 FIRST=$E(FIRST,ALPHA,$L(FIRST))
 S:'FNF FIRST=$E(FIRST,1)
 S X=$S($L(FIRST):LAST_","_FIRST,1:LAST),X=$E(X,1,LEN)
 Q X
GETRANGE(FROMDATE,TODATE) ; Select Date Range (from and to dates)
 N DIR,X,Y,DTOUT,DIRUT S DIR(0)="DO^:DT",DIR("A")="Enter Beginning Date (MM/DD/YY)" W !
 D ^DIR I $D(DIROUT)!$D(DUOUT)!$D(DTOUT)!$D(DIRUT) W ! Q
 S FROMDATE=Y I +FROMDATE>0 D
 . W "  (",$$UP^XLFSTR($$FMTE^XLFDT(+FROMDATE,1)),")"
 . N DIR,X,Y S DIR(0)="DO^::EX",DIR("A")="Enter Ending Date (MM/DD/YY)" S DIR("B")="TODAY"
 . D ^DIR I $D(DIROUT)!$D(DUOUT)!$D(DTOUT)!$D(DIRUT) K FROMDATE Q
 . I Y'>0 K FROMDATE Q
 . S TODATE=Y Q:TODATE>FROMDATE!(TODATE=FROMDATE) 
 . N FRDT S FRDT=FROMDATE,FROMDATE=TODATE,TODATE=FRDT
 W !
 Q
 ;                
OED() ; Other Editor - DIC("S")
 N COMP,OTHER,OWNER,OWNN,USER,AUSER,NAT S COMP=+($G(DA(1))) Q:'$D(^GMT(142,+COMP,0)) 0
 S OWNER=$P($G(^GMT(142,+COMP,0)),"^",3),OWNN=$$UNAM^GMTSU2(OWNER),NAT=+($P($G(^GMT(142,+COMP,"VA")),"^",1)),USER=+($G(DUZ)),AUSER=$$UACT^GMTSU2(+USER),OTHER=+($G(X))
 ;   If National Component and Uneditable
 W:+NAT=2 !!,"  Nationally exported Health Summary Type (uneditable)",! Q:+NAT=2 0
 ;   If OWNER is special case (national, uneditable)
 W:+OWNER>0&(OWNER<1)&(NAT'=1) !!,"  OWNER does not allow 'OTHER EDITORS'",! Q:+OWNER>0&(OWNER<1)&(NAT'=1) 0
 ;   If OWNER is special case (national, editable)
 Q:+OWNER>0&(OWNER<1)&(OWNER=USER)&(NAT=1) 1
 ;   If DUZ is inactive, or not the owner, quit
 W:+AUSER=0!(+OWNER=0)!(+OWNER'=+USER) !!,"  Only the OWNER may assign 'OTHER EDITORS'",! Q:+AUSER=0!(+OWNER=0)!(+OWNER'=+USER) 0
 ;   If OTHER is inactive user, quit
 S AUSER=$$UACT^GMTSU2(OTHER) W:+AUSER=0!(+OTHER'>.999999999) !!,"  Selected 'OTHER EDITOR' is not an active user",! Q:+AUSER=0!(+OTHER'>.999999999) 0
 ;   If OTHER=OWNER, quit
 W:+OTHER=+OWNER !!,"  ",OWNN," is the OWNER",! Q:+OTHER=+OWNER 0
 Q 1
 ;                
FCLR(X) ; File Closed Root
 S X=$G(X) Q:+X=0 "" N GMTSL S GMTSL=$$FLOC(X),X=$S($E(GMTSL,$L(GMTSL))=",":$P(GMTSL,",")_")",1:$E(GMTSL,1,$L(GMTSL)-1)) Q:'$L(X) "" S:'$D(@X) X=""
 Q X
FSFN(X) ; File/Sub-File Name
 N FI,FR,%X,%Y S FI=$G(X) Q:+X=0 "" N DIERR,GMTSN,GMTSE D FILE^DID(+FI,"N","NAME","GMTSN","GMTSE")
 S X="" S:'$D(DIERR) X=$$UP^XLFSTR($G(GMTSN("NAME"))) Q:$L(X) X
 K FR S %X="^DD("_+($G(FI))_",0,""NM"",",%Y="FR(" D %XY^%RCR S X=$$UP^XLFSTR($O(FR(""))) S:+X>0 X="" S:$L(X) X=X_" SUB-FILE" Q X
FNAM(X) ; File Name
 S X=$G(X) Q:+X=0 "" N DIERR,GMTSN,GMTSE D FILE^DID(+X,"N","NAME","GMTSN","GMTSE") S X="" S:'$D(DIERR) X=$G(GMTSN("NAME")) Q X
FLOC(X) ; File location
 S X=$G(X) Q:+X=0 "" N DIERR,GMTSN,GMTSE D FILE^DID(+X,"N","GLOBAL NAME","GMTSN","GMTSE") S X="" S:'$D(DIERR) X=$G(GMTSN("GLOBAL NAME")) Q X
FHDD(X) ; File has a DD?
 S X=+($G(X)) Q:+($G(X))=0 0 S X=$$VFIELD^DILFD(X,.01),X=$S($L(X):1,1:0) Q X
FLDN(X,Y) ; Field Name
 Q:+($G(X))=0!(+($G(Y))=0) "" S X=$$GET1^DID(+($G(X)),+($G(Y)),,"LABEL") Q X
FLDS(X,Y) ; Field Set of Codes
 Q:+($G(X))=0!(+($G(Y))=0) "" Q:$$GET1^DID(+($G(X)),+($G(Y)),,"TYPE")'="SET" "" S X=$$GET1^DID(+($G(X)),+($G(Y)),,"POINTER") Q X
FLDI(X,Y) ; Field Input Transform
 Q:+($G(X))=0!(+($G(Y))=0) "" S X=$$GET1^DID(+($G(X)),+($G(Y)),,"INPUT TRANSFORM") Q X




Output from what File: OE/RR REPORT// health summary compoNENT
                                          (109 entries)
Select HEALTH SUMMARY COMPONENT NAME:    VEFA HOSPITAL ALL PAT CENSUS
Another one:
Standard Captioned Output? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields

NUMBER: 250008                          NAME: VEFA HOSPITAL ALL PAT CENSUS
  PRINT ROUTINE: ENAD;GMTSDGA           TIME LIMITS APPLICABLE: yes
  ABBREVIATION: ADC                     MAXIMUM OCCURRENCES APPLICABLE: yes
  DEFAULT HEADER NAME: Admission/Discharge
 DESCRIPTION:   This component contains information from the MAS package.  Time
 and occurrence limits apply to this component.  Data presented include: date
 range of admission, ward, length of stay (LOS), last treating specialty, last
 provider, admitting diagnosis text, bedsection, principal diagnosis, diagnosis
 for longest length of stay (DXLS), and secondary ICD diagnoses.



Select HEALTH SUMMARY COMPONENT NAME:


Select HEALTH SUMMARY COMPONENT NAME: MAS ADMISSIONS/DISCHARGES
Another one:
Standard Captioned Output? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields

NUMBER: 10                              NAME: MAS ADMISSIONS/DISCHARGES
  PRINT ROUTINE: ENAD;GMTSDGA           TIME LIMITS APPLICABLE: yes
  ABBREVIATION: ADC                     MAXIMUM OCCURRENCES APPLICABLE: yes
  DEFAULT HEADER NAME: Admission/Discharge
 DESCRIPTION:   This component contains information from the MAS package.  Time
 and occurrence limits apply to this component.  Data presented include: date
 range of admission, ward, length of stay (LOS), last treating specialty, last
 provider, admitting diagnosis text, bedsection, principal diagnosis, diagnosis
 for longest length of stay (DXLS), and secondary ICD diagnoses.



Select HEALTH SUMMARY COMPONENT NAME:
IN CPRS30A

elect HEALTH SUMMARY COMPONENT NAME:    MAS ADMISSIONS/DISCHARGES
ANOTHER ONE:
STANDARD CAPTIONED OUTPUT? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields
 
NUMBER: 10                              NAME: MAS ADMISSIONS/DISCHARGES
  PRINT ROUTINE: ENAD;XXXXDGA           TIME LIMITS APPLICABLE: yes
  ABBREVIATION: ADC                     MAXIMUM OCCURRENCES APPLICABLE: yes
  DEFAULT HEADER NAME: Admission/Discharge
  PREFIX: DG
EXTERNAL/EXTRACT ROUTINE: FADM;GMTSDGA2
EXTERNAL/EXTRACT ROUTINE: GETFADM;GMTSDGA2
EXTERNAL/EXTRACT ROUTINE: IN5;VADPT
EXTERNAL/EXTRACT ROUTINE: 6;VADPT0
EXTERNAL/EXTRACT ROUTINE: 6;VADPT3
 DESCRIPTION:   This component contains information from the MAS package.  Time
 and occurrence limits apply to this component.  Data presented include: date
 range of admission, ward, length of stay (LOS), last treating specialty, last
 provider, admitting diagnosis text, bedsection, principal diagnosis, diagnosis
 for longest length of stay (DXLS), and secondary ICD diagnoses.
 


New Report


 
Select OPTION: INQUIRE TO FILE ENTRIES
 
 
 
OUTPUT FROM WHAT FILE: OE/RR REPORT//
Select OE/RR REPORT NAME:    ORRPW MAS ADMISSIONS     Admissions Summary     Adm
issions Summary
ANOTHER ONE:
STANDARD CAPTIONED OUTPUT? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields
 
NUMBER: 1605                            NAME: ORRPW MAS ADMISSIONS
  ID: OR_ADM                            QUALIFIER: HSWPComponent
  ROUTINE: ORDV01                       ENTRY POINT: HSQUERY
  CATEGORY: LISTVIEW                    TAB: REPORTS TAB
  TYPE: LISTVIEW                        RPC: ORWRP REPORT TEXT
  REPORT TAG: DGMADM                    REPORT ROUTINE: XXX1DGA
  REPORT COMPONENT: MAS ADMISSIONS/DISCHARGES
  HEADING: Admissions Summary           DESCRIPTIVE TEXT: Admissions Summary
  PRINT TAG: HSTYPEB                    PRINT ROUTINE: ORWRPP1
  EXTRACT TAG: TADM                     EXTRACT ROUTINE: XXX1DGA
COLUMN HEADERS: Patient Name            SEQUENCE: 1
  PRINT LENGTH: 17                      INCLUDE ON PRINT: YES
COLUMN HEADERS: Unit                    SEQUENCE: 2
  PRINT LENGTH: 5                       INCLUDE ON PRINT: YES
  PRINT TITLE: Unit
COLUMN HEADERS: Ward Room/Bed           SEQUENCE: 3
  PRINT LENGTH: 14                      INCLUDE ON PRINT: YES
  PRINT TITLE: Ward/Room Bed
COLUMN HEADERS: Admit Date              SEQUENCE: 6
  PRINT LENGTH: 10                      INCLUDE ON PRINT: YES
  PRINT TITLE: Admit Date
 
Enter RETURN to continue or '^' to exit:
COLUMN HEADERS: Physician               SEQUENCE: 4
  PRINT LENGTH: 10                      INCLUDE ON PRINT: YES
  PRINT TITLE: Physician
COLUMN HEADERS: Referral Source         SEQUENCE: 5
  PRINT LENGTH: 20                      INCLUDE ON PRINT: YES
  PRINT TITLE: Referral Source
COLUMN HEADERS: Legal                   SEQUENCE: 9
  PRINT LENGTH: 5                       INCLUDE ON PRINT: YES
  PRINT TITLE: Legal
COLUMN HEADERS: LOS                     SEQUENCE: 7
  PRINT LENGTH: 4                       INCLUDE ON PRINT: YES
  PRINT TITLE: LOS
COLUMN HEADERS: Type of Insurance       SEQUENCE: 8
  PRINT LENGTH: 19                      INCLUDE ON PRINT: YES
  PRINT TITLE: Type of Insurance
COLUMN HEADERS: Authorized Days         SEQUENCE: 10
  PRINT LENGTH: 16                      INCLUDE ON PRINT: YES
  PRINT TITLE: Authorized Days
  SORT ORDER: 3:5
 

Latest:

 
OUTPUT FROM WHAT FILE: OE/RR REPORT//
Select OE/RR REPORT NAME: ORRPW MAS ADMISSIONS       Admissions Summary     Admi
ssions Summary
ANOTHER ONE:
STANDARD CAPTIONED OUTPUT? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields
 
NUMBER: 1605                            NAME: ORRPW MAS ADMISSIONS
  ID: OR_ADM                            QUALIFIER: HSWPComponent
  ROUTINE: ORDV01                       ENTRY POINT: HSQUERY
  CATEGORY: LISTVIEW                    TAB: REPORTS TAB
  TYPE: LISTVIEW                        RPC: ORWRP REPORT TEXT
  REPORT TAG: DGMADM                    REPORT ROUTINE: XXX1DGA
  REPORT COMPONENT: MAS ADMISSIONS/DISCHARGES
  HEADING: Admissions Summary           DESCRIPTIVE TEXT: Admissions Summary
  PRINT TAG: HSTYPEB                    PRINT ROUTINE: ORWRPP1
  EXTRACT TAG: TADM                     EXTRACT ROUTINE: XXX1DGA
COLUMN HEADERS: Patient Name            SEQUENCE: 2
  PRINT LENGTH: 17                      INCLUDE ON PRINT: YES
COLUMN HEADERS: Unit                    SEQUENCE: 3
  PRINT LENGTH: 5                       INCLUDE ON PRINT: YES
  PRINT TITLE: Unit
COLUMN HEADERS: Ward Room/Bed           SEQUENCE: 4
  PRINT LENGTH: 14                      INCLUDE ON PRINT: YES
  PRINT TITLE: Ward/Room Bed
COLUMN HEADERS: Admit Date              SEQUENCE: 7
  PRINT LENGTH: 10                      INCLUDE ON PRINT: YES
  PRINT TITLE: Admit Date
 
Enter RETURN to continue or '^' to exit:
COLUMN HEADERS: Physician               SEQUENCE: 5
  PRINT LENGTH: 10                      INCLUDE ON PRINT: YES
  PRINT TITLE: Physician
COLUMN HEADERS: Referral Source         SEQUENCE: 6
  PRINT LENGTH: 20                      INCLUDE ON PRINT: YES
  PRINT TITLE: Referral Source
COLUMN HEADERS: Legal                   SEQUENCE: 10
  PRINT LENGTH: 5                       INCLUDE ON PRINT: YES
  PRINT TITLE: Legal
COLUMN HEADERS: LOS                     SEQUENCE: 8
  PRINT LENGTH: 4                       INCLUDE ON PRINT: YES
  PRINT TITLE: LOS
COLUMN HEADERS: Type of Insurance       SEQUENCE: 9
  PRINT LENGTH: 19                      INCLUDE ON PRINT: YES
  PRINT TITLE: Type of Insurance
COLUMN HEADERS: Authorized Days         SEQUENCE: 11
  PRINT LENGTH: 16                      INCLUDE ON PRINT: YES
  PRINT TITLE: Authorized Days
COLUMN HEADERS: Facility                SEQUENCE: 1
  PRINT LENGTH: 20                      INCLUDE ON PRINT: YES
  PRINT TITLE: Facility
 
Enter RETURN to continue or '^' to exit:
COLUMN HEADERS: Sequence                SEQUENCE: 1.5
  PRINT LENGTH: 20                      INCLUDE ON PRINT: YES
  PRINT TITLE: Sequence #
  SORT ORDER: 3:5
 
 Sequence # 1 and 1.5 take up just filling in Facility COLUMNS HEADER 
 Logged On Value
  with automatic added x.xx sequence numberextra column value put into 
  unfilled sEQUENCE # column header
 
Select OE/RR REPORT NAME:

 INSTRUCTIONS:

 Load VEFA_ADM_1_0.KID

 Add ORRPW MAS ADMISSION oe/rr report by package to parameter 
 ORWRP REPORT LIST   List of reports 

 ASTRON>D ^XQ1

Select OPTION NAME: XPAR EDIT
     1   XPAR EDIT BY TEMPLATE       Edit Parameter Values with Template
     2   XPAR EDIT KEYWORD       Edit Parameter Definition Keyword
     3   XPAR EDIT PARAMETER       Edit Parameter Values
CHOOSE 1-3: 3  XPAR EDIT PARAMETER     Edit Parameter Values
Edit Parameter Values
                         --- Edit Parameter Values ---

Select PARAMETER DEFINITION NAME: ORWRP REPORT LIST

Select Sequence: ?


Sequence  Value
--------  -----
1         TMG GROWTH CHARTS
1.1       TMG WHO GROWTH CHARTS
2         ORRPW REPORT CATEGORIES
3         TMG GROWTH CHARTS
3.1       TMG WHO GROWTH CHARTS
4         TMG GROWTH CHARTS
4.1       TMG WHO GROWTH CHARTS
5         ORRP HEALTH SUMMARY
6         ORRPW HDR
8         ORRPW DOD
10        ORRP IMAGING
12        ORWG GRAPHING
15        ORRP LAB STATUS
20        ORRP BLOOD BANK
25        ORRP AP ALL
30        ORRP DIETETICS PROFILE
35        ORRP NUTRITIONAL ASSESS
40        ORRP VITALS CUM
45        ORRP PROCEDURES
50        ORRP DAILY ORDER SUMMARY

Type <Enter> to continue or '^' to exit:
55        ORRP ORDER SUM FOR A DATE RNG
60        ORRP CHART COPY SUMMARY
65        ORRP OUTPATIENT RX PROFILE
70        ORRP BCMA MED LOG
75        ORRP BCMA MAH
80        ORRP SURGERIES
85        ORRP ECS

Sequence #: 1
Select Sequence: 1
Are you adding 1 as a new Sequence? Yes//   YES

Sequence: 1//    1
Report:ORRPW MAS ADMISSION

 


Routines:

XXXXDGA ; SLC/MKB,KER/NDBI - Admissions for HS ; 03/24/2004
 ;;2.7;Health Summary;**28,49,71**;Oct 20, 1995
 ;                   
 ; External Reference
 ;   DBIA  3390  $$ICDDX^ICDCODE
 ;   DBIA    17  ^DGPM("ATID"
 ;   DBIA  1372  ^DGPT(
 ;   DBIA 10082  ^ICD9(
 ;   DBIA  2929  DSP^A7RHSM
 ;   DBIA  2929  LST^A7RHSM
 ;   DBIA   512  ^DGPMLOS
 ;   DBIA 10061  IN5^VADPT
 ;   DBIA 10061  KVAR^VADPT
 ;                    
ENAD ; Gets Admission Information 
 S TT=1,FLGDX=0,FLGDC=0
 D PATINFO Q
ENDC ; Discharge Information
 S TT=3,FLGDC=1,FLGDX=0
 D PATINFO Q
ENDX ; PTF Discharge Diagnosis
 S TT=3,FLGDX=1,FLGDC=0
 D PATINFO Q
ENTS ; Treating Speciality Information
 S TT=6,FLGDX=0,FLGDC=0
 D PATINFO Q
ENTR ; Transfers
 S TT=2,FLGDX=0,FLGDC=0
 D PATINFO Q
PATINFO ; Patient Information
 N DFN1,RGMTS1,STATION
 ;S ^XTMP("HE")=1
 S VA200=1 K DIQ
 I $D(GMTSNDM),GMTSNDM>0 S CNTR=GMTSNDM
 E  S CNTR=100
 ;PUT A HEADER
 S STATION=$P($G(^DIC(4,DUZ(2),99)),"^",1)
 ;GOTO OVER
 W "STATION= "_STATION,?15,"INSTITUTION= "_DUZ(2)_" AS "_$P($G(^DIC(4,DUZ(2),0)),"^",1),!
 S GMC=-1,GMN="",ADM=9999999.99-GMTS2,FLAG=0 S RGMTS1=9999999.99-GMTS1
 ;S ^XTMP("HE")=GMTS1_"^"_GMTS2
 ;I TT=1 D FADM^GMTSDGA2
 D:$$ROK^GMTSU("A7RHSM")&($$NDBI^GMTSU) LST^A7RHSM(DFN,.A7RHS)
 F  S ADM=$O(^DGPM("AMV"_TT,ADM)) Q:('ADM!(ADM>RGMTS1)!($D(GMTSQIT)))  D
 .S ^XTMP("HE")=2
 .S DFN1=0 F  S DFN1=$O(^DGPM("AMV"_TT,ADM,DFN1)) Q:DFN1=""  D
 ..D:$$ROK^GMTSU("A7RHSM")&($$NDBI^GMTSU) DSP^A7RHSM(ADM) D GET Q:$D(GMTSQIT)!($G(CNTR)<0)
 D KILLADM K:$$NDBI^GMTSU A7RHS
 Q
GET ; Admission Data
 N VAHOW
 I TT=1 S DFN=DFN1 D FADM^GMTSDGA2
 S ORDFN=DFN D DEM^GMTSU ;D HSTYPEB^ORWRPP1
 S ADA=$O(^DGPM("AMV"_TT,ADM,DFN1,0)) Q:'ADA
 S CNTR=CNTR-1 I CNTR<0 Q
 S VAIP("E")=ADA D IN5^VADPT
 S (X,ADATE)=+VAIP(3) D REGDT4^GMTSU S ADT=X
 K DGPMIFN S:TT=1 DGPMIFN=ADA S:TT'=1 DGPMIFN=VAIP(13)
 S GMC=2
 D CONTGET
 S LIN=$S(TT=2:"TROUT^GMTSDGA1",FLGDX:"DXOUT^GMTSDGA1",FLGDC:"DCOUT^GMTSDGA1",TT=6:"TSOUT^GMTSDGA2",TT=1:"ADOUT") D @LIN
 K ICD(ADM)
 Q
CONTGET ; ICD and LOS info only needed for certain MAS components
 Q:TT=2  Q:TT=6  N ICDX,ICDI I DGPMIFN D ^DGPMLOS S LOS=+X
 S PTF=$S($D(VAIP(12)):VAIP(12),1:"") Q:'$D(^ICD9)  Q:PTF=""  Q:'$D(^DGPT(PTF,70))
 S ICD=^DGPT(PTF,70)
 S ICDI=+$P(ICD,U,11) I ICDI>0 D
 . S ICDX=$$ICDDX^ICDCODE(ICDI)
 . S ICD(ADM,1,80,ICDI,.01)=$P(ICDX,"^",2)
 . S ICD(ADM,1,80,ICDI,3)=$P(ICDX,"^",4)
 S ICDI=+$P(ICD,U,10) I ICDI>0 D
 . S ICDX=$$ICDDX^ICDCODE(ICDI)
 . S ICD(ADM,2,80,ICDI,.01)=$P(ICDX,"^",2)
 . S ICD(ADM,2,80,ICDI,3)=$P(ICDX,"^",4)
 F GMTSI=16:1:24 S ICDI=+$P(ICD,U,GMTSI) I ICDI>0 D
 . S ICDX=$$ICDDX^ICDCODE(ICDI)
 . S ICD(ADM,(GMTSI-13),80,ICDI,.01)=$P(ICDX,"^",2)
 . S ICD(ADM,(GMTSI-13),80,ICDI,3)=$P(ICDX,"^",4)
 Q
KILLADM ; Kill Admission variables
 D KVAR^VADPT
 K ADA,ADATE,ADT,BD,BDSC,DA,DIC,DDT,DP,DSPL,GMJ,GMJ1,OP,OPTR,FLAG,FLGDX,FLGDC,X,DR,GMI,GMTO,GMTNO,GMTSI,GMX,ADM,CNTR,GMC,GMZ,GMN,ICD,PTF,PTF70,PTFLG,LOS,II,DGPMIFN,IN,LIN,TI,TT,TS,SPEC
 Q
ADOUT ; Admissions Output
 N STATION,WARDIEN,WARDDIV,WARDSTAT,NODEDGPM,PHYSIC,PHYSICT
 I FLAG>1,'GMTSNPG D CKP^GMTSUP Q:$D(GMTSQIT)  ;W !
 D CKP^GMTSUP Q:$D(GMTSQIT)
 S FLAG=2
 ;GOTO OVER
 I $G(VAIP(17,1))'="" S CNTR=CNTR+1 Q ; DISCHARGED ALREADY
 ;DETERMINE WARD LOCATION MEDICAL CENTER DIVISION MATCHING THE STATION NUMBER TO CORRESPINDING INSITITUTION ENTRY STATION NUMBER. ( IE. 580CAM TO 580CAM)
 ;DETERMINE LOGGED ON DIVISION( REALLY INSTITUTION) STATION
 S STATION=$P($G(^DIC(4,DUZ(2),99)),"^",1)
 ;GOTO OVER
 I STATION="" S CNTR=CNTR+1 W "STATION= "_"",?15,"INSTITUTION= "_DUZ(2)_"-"_$P($G(^DIC(4,DUZ(2),0)),"^",1),! Q
 ;GOTO OVER
 ;GET WARD LOCATION NUMBER FROM WARD NAME
 ;W "GMTSWARD= ",GMTSWARD,!
 I GMTSWARD'="" D
 .S WARDIEN=0 S WARDIEN=$O(^DIC(42,"B",GMTSWARD,WARDIEN))
 E  D
 .S WARDIEN=""
 ;GET MEDICAL CENTER DIVISION
 ;GOTO OVER
 I WARDIEN="" S CNTR=CNTR+1 W "GMTSWARD= "_GMTSWARD,?25,"WARD IEN="_"",! Q
 ;GOTO OVER
 ;GET MEDICAL CENTER DIVISION AND STATION
 S WARDDIV=$P($G(^DIC(42,WARDIEN,0)),"^",11)
 I WARDDIV="" S CNTR=CNTR+1 W "WARD: "_GMTSWARD,?25,"WARD DIVISION= "_"",! Q
 ;GET DIVISION STATION NUMBER (FACILITY NUMBER)
 S WARDSTAT=$P($G(^DG(40.8,WARDDIV,0)),"^",2)
 I WARDSTAT="" S CNTR=CNTR+1 W "WARD DIVISION STATION="_"",! Q
 I WARDSTAT'=STATION S CNTR=CNTR+1 Q ;DON'T COUNT WARDS IN ANOTHER HOSPITAL INSITUTION ( DIVISION). ONLY ONE LOGGED ONTO LIKE FOR CAMBRIDGE HOSPITAL
OVER	; 
 ;I $G(VAIP(17,1))'="" S CNTR=CNTR+1 Q ; DISCHARGED ALREADY
 I $G(VAIP(17,1))="" S DDT="Present"
 E  S X=$P(VAIP(17,1),U,1) D REGDT4^GMTSU S DDT=X
 W ADT," - ",DDT I VAIP(17,1)="" W ?25,"Ward: "_GMTSWARD,?45,"Room/Bed= "_GMTSRB
 W ?66,"LOS: ",LOS,!
 S TS=$P($G(^DIC(45.7,+$P($G(VAIP(14,6)),U),0)),U,2) S SPEC=$P($G(^DIC(42.4,+TS,0)),U)
 W GMTSPNM_"    "_GMTSSN,?50,"DOB: "_GMTSDOB,?67,"Age: ",GMTSAGE,?75,"Facility= "_DUZ(2),!
 S PHYSICT=""
 S NODEDGPM=$G(^DGPM(ADA+1,0)) ;TREATING SPECIALTY PREOVIDER CHANGE
 S PHYSIC=$P(NODEDGPM,"^",8) ;PRIMARY PHYSICIAN FIRST
 I PHYSIC'="" D
 .S PHYSICT=$P($G(^VA(200,PHYSIC,0)),"^",1)
 E  D
 .S PHYSIC=$P(NODEDGPM,"^",19) ;THEN ATTENDING IF NO PRIMARY PHYSICIAN
 . I PHYSIC'="" S PHYSICT=$P($G(^VA(200,PHYSIC,0)),"^",1)
 D CKP^GMTSUP Q:$D(GMTSQIT)  W "  Last Tr Specialty: ",$E(SPEC,1,25),?50,"Last Prov: ",$E(PHYSICT,1,15),!
 I $G(VAIP(17,1))="" D CKP^GMTSUP Q:$D(GMTSQIT)  W "Admitting Diagnosis: ",$G(VAIP(13,7)),!
 I PTF'="",$D(^DGPT(+PTF,70)) D CKP^GMTSUP Q:$D(GMTSQIT)  W "         Bedsection: ",$S(+($P(^DGPT(PTF,70),U,2))>0:$P($G(^DIC(42.4,+$P(^DGPT(PTF,70),U,2),0)),U),1:""),!
 Q:'$D(ICD)  S GMI=0 F  S GMI=$O(ICD(ADM,GMI)) Q:'GMI  D CKP^GMTSUP Q:$D(GMTSQIT)  S GMX="" F  S GMX=$O(ICD(ADM,GMI,80,GMX)) Q:'GMX  D NXT
 Q
NXT ; Next Diagnosis
 S (GMTO,GMTNO)="" S GMTO=$G(ICD(ADM,GMI,80,GMX,3)),GMTNO=$G(ICD(ADM,GMI,80,GMX,.01))
 W:GMI=1 "Principal Diagnosis: " W:GMI=2 ?15,"DXLS: "
 W:GMI=3 ?13,"ICD DX: " W ?21,GMTO,?62,GMTNO,!
 S NODIAG=0
 Q

XXX1DGA ; SLC/MKB,KER/NDBI - Admissions for HS Extractioon; 03/24/2004
 ;;2.7;Health Summary;**28,49,71**;Oct 20, 1995
 ;                   
 ; External Reference
 ;   DBIA  3390  $$ICDDX^ICDCODE
 ;   DBIA    17  ^DGPM("ATID"
 ;   DBIA  1372  ^DGPT(
 ;   DBIA 10082  ^ICD9(
 ;   DBIA  2929  DSP^A7RHSM
 ;   DBIA  2929  LST^A7RHSM
 ;   DBIA   512  ^DGPMLOS
 ;   DBIA 10061  IN5^VADPT
 ;   DBIA 10061  KVAR^VADPT
 ;                    
ENAD(TIUY,GMTS1,GMTS2,GMTSNDM) ; Gets Admission Information. Eventually Filtered out for Division ( Institution) too 
 ;           for Wards per this Division matrching the Institution (Station) of the logged on User 
 N TIUI
 S TIUY=$NA(^TMP("TIUR",$J))
 K @TIUY
 S TIUI=0
 S TT=1,FLGDX=0,FLGDC=0
 D PATINFO Q
ENDC ; Discharge Information
 S TT=3,FLGDC=1,FLGDX=0
 D PATINFO Q
ENDX ; PTF Discharge Diagnosis
 S TT=3,FLGDX=1,FLGDC=0
 D PATINFO Q
ENTS ; Treating Speciality Information
 S TT=6,FLGDX=0,FLGDC=0
 D PATINFO Q
ENTR ; Transfers
 S TT=2,FLGDX=0,FLGDC=0
 D PATINFO Q
PATINFO ; Patient Information
 N DFN1,RGMTS1,STATION
 S ^XTMP("HDD1")=GMTS2_"^"_GMTS1
 S VA200=1 K DIQ
 I $D(GMTSNDM),GMTSNDM>0 S CNTR=GMTSNDM
 E  S CNTR=100
 S CNTR=100
 ;DEFINE HEADER DATA
 S STATION=$P($G(^DIC(4,DUZ(2),99)),"^",1)
 ;GOTO OVER
 ;;;;;;W "STATION= "_STATION,?15,"INSTITUTION= "_DUZ(2)_" AS "_$P($G(^DIC(4,DUZ(2),0)),"^",1),!
 S GMC=-1,GMN="",ADM=GMTS1,FLAG=0 S RGMTS1=GMTS2
 ;S ^XTMP("HE")=GMTS1_"^"_GMTS2
 ;I TT=1 D FADM^GMTSDGA2
 D:$$ROK^GMTSU("A7RHSM")&($$NDBI^GMTSU) LST^A7RHSM(DFN,.A7RHS)
 F  S ADM=$O(^DGPM("AMV"_TT,ADM)) Q:('ADM!(ADM>RGMTS1)!($D(GMTSQIT))!($G(CNTR)<0))  D
 .S ^XTMP("HDD1")=3
 .S DFN1=0 F  S DFN1=$O(^DGPM("AMV"_TT,ADM,DFN1)) Q:(DFN1="")!($G(CNTR)<0)  D
 ..D GET(.TIUY) Q:($G(CNTR)<0)
 ..;D:$$ROK^GMTSU("A7RHSM")&($$NDBI^GMTSU) DSP^A7RHSM(ADM) D GET(.TIUY,TIUI) Q:$D(GMTSQIT)!($G(CNTR)<0)
 D KILLADM K:$$NDBI^GMTSU A7RHS K @TIUY@("INDX")
 Q
GET(TIUY) ; Admission Data
 N VAHOW
 I TT=1 S DFN=DFN1 D FADM^GMTSDGA2
 S ORDFN=DFN D DEM^GMTSU ;D HSTYPEB^ORWRPP1
 S ADA=$O(^DGPM("AMV"_TT,ADM,DFN1,0)) Q:'ADA
 S CNTR=CNTR-1 I CNTR<0 Q
 S VAIP("E")=ADA D IN5^VADPT
 S (X,ADATE)=+VAIP(3) D REGDT4^GMTSU S ADT=X
 K DGPMIFN S:TT=1 DGPMIFN=ADA S:TT'=1 DGPMIFN=VAIP(13)
 S GMC=2
 D CONTGET
 S ^XTMP("HDD1")=5
 S LIN=$S(TT=2:"TROUT^GMTSDGA1",FLGDX:"DXOUT^GMTSDGA1",FLGDC:"DCOUT^GMTSDGA1",TT=6:"TSOUT^GMTSDGA2",TT=1:"ADOUT") D @LIN
 K ICD(ADM)
 Q
CONTGET ; ICD and LOS info only needed for certain MAS components
 Q:TT=2  Q:TT=6  N ICDX,ICDI I DGPMIFN D ^DGPMLOS S LOS=+X
 S PTF=$S($D(VAIP(12)):VAIP(12),1:"") Q:'$D(^ICD9)  Q:PTF=""  Q:'$D(^DGPT(PTF,70))
 S ICD=^DGPT(PTF,70)
 S ICDI=+$P(ICD,U,11) I ICDI>0 D
 . S ICDX=$$ICDDX^ICDCODE(ICDI)
 . S ICD(ADM,1,80,ICDI,.01)=$P(ICDX,"^",2)
 . S ICD(ADM,1,80,ICDI,3)=$P(ICDX,"^",4)
 S ICDI=+$P(ICD,U,10) I ICDI>0 D
 . S ICDX=$$ICDDX^ICDCODE(ICDI)
 . S ICD(ADM,2,80,ICDI,.01)=$P(ICDX,"^",2)
 . S ICD(ADM,2,80,ICDI,3)=$P(ICDX,"^",4)
 F GMTSI=16:1:24 S ICDI=+$P(ICD,U,GMTSI) I ICDI>0 D
 . S ICDX=$$ICDDX^ICDCODE(ICDI)
 . S ICD(ADM,(GMTSI-13),80,ICDI,.01)=$P(ICDX,"^",2)
 . S ICD(ADM,(GMTSI-13),80,ICDI,3)=$P(ICDX,"^",4)
 Q
KILLADM ; Kill Admission variables
 D KVAR^VADPT
 K ADA,ADATE,ADT,BD,BDSC,DA,DIC,DDT,DP,DSPL,GMJ,GMJ1,OP,OPTR,FLAG,FLGDX,FLGDC,X,DR,GMI,GMTO,GMTNO,GMTSI,GMX,ADM,CNTR,GMC,GMZ,GMN,ICD,PTF,PTF70,PTFLG,LOS,II,DGPMIFN,IN,LIN,TI,TT,TS,SPEC
 Q
ADOUT ; Admissions Output. Pass ADT (formatted ADM),TIUY,TIUI,DFN,ADA
 N STATION,WARDIEN,WARDDIV,WARDSTAT,UNIT,IEN,NODEP,OVER1,NODEP1,INSURNCE,INSURPTR,STATION1,NODEDGPM,PHYSIC,PHYSICT
 S ^XTMP("HDD1")=6
 ;;;;;;I FLAG>1,'GMTSNPG D CKP^GMTSUP Q:$D(GMTSQIT)  ;W !
 ;;;;;;D CKP^GMTSUP Q:$D(GMTSQIT)
 S FLAG=2
 ;GOTO OVER
 S ^XTMP("HDD1")=2
 I $G(VAIP(17,1))'="" S CNTR=CNTR+1 Q ; DISCHARGED ALREADY
 ;DETERMINE WARD LOCATION MEDICAL CENTER DIVISION MATCHING THE STATION NUMBER TO CORRESPINDING INSITITUTION ENTRY STATION NUMBER. ( IE. 580CAM TO 580CAM)
 ;DETERMINE LOGGED ON DIVISION( REALLY INSTITUTION) STATION
 S STATION=$P($G(^DIC(4,DUZ(2),99)),"^",1)
 S STATION1=$P($G(^DIC(4,DUZ(2),0)),"^",1)
 ;GOTO OVER
 I STATION="" S CNTR=CNTR+1 Q ;W "STATION= "_"",?15,"INSTITUTION= "_DUZ(2)_"-"_$P($G(^DIC(4,DUZ(2),0)),"^",1),! Q
 ;GOTO OVER
 ;GET WARD LOCATION NUMBER FROM WARD NAME
 ;W "GMTSWARD= ",GMTSWARD,!
 I GMTSWARD'="" D
 .S WARDIEN=0 S WARDIEN=$O(^DIC(42,"B",GMTSWARD,WARDIEN))
 E  D
 .S WARDIEN=""
 ;GET MEDICAL CENTER DIVISION
 ;GOTO OVER
 I WARDIEN="" S CNTR=CNTR+1 Q ;W "GMTSWARD= "_GMTSWARD,?25,"WARD IEN="_"",! Q
 ;GOTO OVER
 ;GET MEDICAL CENTER DIVISION AND STATION
 S WARDDIV=$P($G(^DIC(42,WARDIEN,0)),"^",11)
 I WARDDIV="" S CNTR=CNTR+1 Q ;W "WARD: "_GMTSWARD,?25,"WARD DIVISION= "_"",! Q
 ;GET DIVISION STATION NUMBER (FACILITY NUMBER)
 S WARDSTAT=$P($G(^DG(40.8,WARDDIV,0)),"^",2)
 I WARDSTAT="" S CNTR=CNTR+1 Q ;W "WARD DIVISION STATION="_"",! Q
 I WARDSTAT'=STATION S CNTR=CNTR+1 Q ;DON'T COUNT WARDS IN ANOTHER HOSPITAL INSITUTION ( DIVISION). ONLY ONE LOGGED ONTO LIKE FOR CAMBRIDGE HOSPITAL
OVER	; 
 S TIUI=+$G(TIUI)+1
 S ^XTMP("HDD5")=TIUI
 S @TIUY@(TIUI)=ADA_U_STATION1_U_GMTSPNM
 S @TIUY@("INDX",ADA,TIUI)=""
 ;NEXT AGE TO AOL OR ADULT OR CHILD
 S UNIT=""
 I GMTSAGE<12 S UNIT="Child"
 I (GMTSAGE>11)&(GMTSAGE<21) S UNIT="Adol"
 I (GMTSAGE>20) S UNIT="Adult"
 S @TIUY@(TIUI)=@TIUY@(TIUI)_U_UNIT
 ;Next Ward&Room/Bed
 S @TIUY@(TIUI)=@TIUY@(TIUI)_U_GMTSWARD_" "_GMTSRB
 ;Next Physician(Last Provider)
 S PHYSICT=""
 S NODEDGPM=$G(^DGPM(ADA+1,0)) ;TREATING SPECIALTY PREOVIDER CHANGE
 S PHYSIC=$P(NODEDGPM,"^",8) ;PRIMARY PHYSICIAN FIRST
 I PHYSIC'="" D
 .S PHYSICT=$P($G(^VA(200,PHYSIC,0)),"^",1)
 E  D
 .S PHYSIC=$P(NODEDGPM,"^",19) ;THEN ATTENDING IF NO PRIMARY PHYSICIAN
 . I PHYSIC'="" S PHYSICT=$P($G(^VA(200,PHYSIC,0)),"^",1)
 ;S @TIUY@(TIUI)=@TIUY@(TIUI)_U_$E($P($G(VAIP(14,5)),U,2),1,15)
 S @TIUY@(TIUI)=@TIUY@(TIUI)_U_$E(PHYSICT,1,15)
 ; Next Referral Source
 S @TIUY@(TIUI)=@TIUY@(TIUI)_U_" "
 ;Next Admit Date
 S @TIUY@(TIUI)=@TIUY@(TIUI)_U_ADT
 ;Next LOS
 S @TIUY@(TIUI)=@TIUY@(TIUI)_U_LOS 
 ;Next Type Of Insurance (Primary)
 S OVER1=0
 S NODEP1=0 ; NO INSURANCE
 S IEN=0 F  S IEN=$O(^DPT(DFN,.312,IEN)) Q:(IEN="")!(OVER1'=0)  D
 .;CHECK COORDINATION OF BENEFITS AS PRIMARY
 .S NODEP=$P($G(^DPT(DFN,.312,IEN,0)),"^",20)
 .I NODEP="1" S OVER1=IEN
 .I IEN=1 S NODEP1=IEN
 S INSURNCE=" "
 I OVER1'=0 D
 .S INSURPTR=$P($G(^DPT(DFN,.312,OVER1,0)),"^",1)
 .I INSURPTR'="" S INSURNCE=$P($G(^DIC(36,INSURPTR,0)),"^",1)
 .S @TIUY@(TIUI)=@TIUY@(TIUI)_U_INSURNCE
 E  D
 .;CHECK IF ONE (FIRST) INSURANCE ELSE PUT IN BLANKS
 .I NODEP1'=0 D
 ..S INSURPTR=$P($G(^DPT(DFN,.312,NODEP1,0)),"^",1)
 ..I INSURPTR'="" S INSURNCE=$P($G(^DIC(36,INSURPTR,0)),"^",1)
 ..S @TIUY@(TIUI)=@TIUY@(TIUI)_U_INSURNCE
 E  D
 ..S @TIUY@(TIUI)=@TIUY@(TIUI)_U_INSURNCE
 ;Next Legal as i.e. Admission Category ptr to Sharing Agreement File with Creating a PTF record with an admission.
 ;for now just blank. Should be Volunary(VOL) or Involuntary(INVOL).
 ;
 S @TIUY@(TIUI)=@TIUY@(TIUI)_U_" "
 ;Next Authorized Days ( Later get last insurance review for primary insurance in "pending" or "complete" status.
 ;If complete status check Authorized days left from time of Insurance Review completion date. If admission date within this duration , put # of days
 ;left. If no days left , then put in put in "Pending Pre-certification" as new insurance review is needed. 
 ;If current insurance (last) review is found, and in "pending" state and Authorized days are within date of admission, put in "Peer to Peer Review"
 ;else put in "Pending Pre-Certification"). For now put in blank.
 S @TIUY@(TIUI)=@TIUY@(TIUI)_U_" "
 ;I $G(VAIP(17,1))'="" S CNTR=CNTR+1 Q ; DISCHARGED ALREADY
 I $G(VAIP(17,1))="" S DDT="Present"
 E  S X=$P(VAIP(17,1),U,1) D REGDT4^GMTSU S DDT=X
 ;W ADT," - ",DDT I VAIP(17,1)="" W ?25,"Ward: "_GMTSWARD,?45,"Room/Bed= "_GMTSRB
 ;W ?66,"LOS: ",LOS,!
 S TS=$P($G(^DIC(45.7,+$P($G(VAIP(14,6)),U),0)),U,2) S SPEC=$P($G(^DIC(42.4,+TS,0)),U)
 ;W GMTSPNM_"    "_GMTSSN,?50,"DOB: "_GMTSDOB,?67,"Age: ",GMTSAGE,?75,"Facility= "_DUZ(2),!
 ;;;;;;;D CKP^GMTSUP Q:$D(GMTSQIT)  ;W "  Last Tr Specialty: ",$E(SPEC,1,25),?50,"Last Prov: ",$E($P($G(VAIP(14,5)),U,2),1,15),!
 ;;;;;;;I $G(VAIP(17,1))="" D CKP^GMTSUP Q:$D(GMTSQIT)  ;W "Admitting Diagnosis: ",$G(VAIP(13,7)),!
 ;;;;;;;I PTF'="",$D(^DGPT(+PTF,70)) D CKP^GMTSUP Q:$D(GMTSQIT)  ;W "         Bedsection: ",$S(+($P(^DGPT(PTF,70),U,2))>0:$P($G(^DIC(42.4,+$P(^DGPT(PTF,70),U,2),0)),U),1:""),!
 ;;;;;;;Q:'$D(ICD)  S GMI=0 F  S GMI=$O(ICD(ADM,GMI)) Q:'GMI  D CKP^GMTSUP Q:$D(GMTSQIT)  S GMX="" F  S GMX=$O(ICD(ADM,GMI,80,GMX)) Q:'GMX  D NXT
 Q
NXT ; Next Diagnosis
 S (GMTO,GMTNO)="" S GMTO=$G(ICD(ADM,GMI,80,GMX,3)),GMTNO=$G(ICD(ADM,GMI,80,GMX,.01))
 ;W:GMI=1 "Principal Diagnosis: " W:GMI=2 ?15,"DXLS: "
 ;W:GMI=3 ?13,"ICD DX: " W ?21,GMTO,?62,GMTNO,!
 S NODIAG=0
 Q
DGMADM(ROOT,ORALPHA,OROMEGA,ORMAX,ORDBEG,ORDEND,OREXT) ;  Admission Summaries in Spreadsheet Format
 ;Ext calls: VASITE, DIQ1, TIUSRVLO
 I $L($T(GCPR^OMGCOAS1)) D  Q  ; Call if FHIE station 200
 . D GCPR^OMGCOAS1(DFN,"DS",ORDBEG,ORDEND,ORMAX)
 . S ROOT=$NA(^TMP("ORDATA",$J))
 N ORGLOB,ORGLOBA,ORI,ORNODE,ORICDIEN,ORARRAY,ORTEMP,ORSITE,SITE,DIC,DR,DIQ,DA,GO
 Q:'$L(OREXT)
 S GO=$P(OREXT,";")_"^"_$P(OREXT,";",2)
 Q:'$L($T(@GO))
 S ORSITE=$$SITE^VASITE,ORSITE=$P(ORSITE,"^",2)_";"_$P(ORSITE,"^",3)
 D @GO
 I '$D(@ORGLOB) Q
 K ^TMP("ORDATA",$J)
 S ORNODE=0,ORI=0
 ;F  S ORNODE=$O(@ORGLOB@(ORNODE)) Q:'ORNODE!(ORI'<ORMAX)  D
 F  S ORNODE=$O(@ORGLOB@(ORNODE)) Q:'ORNODE  D
 . S ORTEMP=@ORGLOB@(ORNODE)
 . ;S SITE=$S($L($G(@ORGLOB@(ORNODE,"facility"))):^("facility"),1:ORSITE)
 . ;S ^TMP("ORDATA",$J,ORNODE,"WP",1)="1^"_SITE ;Station ID
 . S ^TMP("ORDATA",$J,ORNODE,"WP",1)="1^"_$E($P(ORTEMP,U,2),1,20) ;Facility Logged On
 . S ^TMP("ORDATA",$J,ORNODE,"WP",2)="2^"_$E($P(ORTEMP,U,3),1,17) ;Patient Name (Last,First]
 . ;;;;;K ORARRAY S DIC=8925,DA=$P(ORTEMP,U),DR=".05;.07;.08;1202;1502",DIQ="ORARRAY"
 . ;;;;;D EN^DIQ1
 . ;;;;;;S DIQ="ORARRAY(8925,"_DA_")"
 . S ^TMP("ORDATA",$J,ORNODE,"WP",3)="3^"_$P(ORTEMP,U,4) ; Unit      $$DATEMMM^ORDVU($G(@DIQ@(.07))) ;episode begin date/time
 . S ^TMP("ORDATA",$J,ORNODE,"WP",4)="4^"_$P(ORTEMP,U,5) ; Ward/Room-Bed      $$DATEMMM^ORDVU($G(@DIQ@(.08))) ;episode end date/time
 . S ^TMP("ORDATA",$J,ORNODE,"WP",5)="5^"_$P($P(ORTEMP,U,6),",",1) ; Primary Physician (last name)     $G(@DIQ@(1202)) ;author/dicator
 . S ^TMP("ORDATA",$J,ORNODE,"WP",6)="6^"_$P(ORTEMP,U,7) ; Referral Source      $G(@DIQ@(1502)) ;signed by
 . S ^TMP("ORDATA",$J,ORNODE,"WP",7)="7^"_$E($P(ORTEMP,U,8),1,10) ; Admit Date      $G(@DIQ@(.05)) ;status
 . S ^TMP("ORDATA",$J,ORNODE,"WP",8)="8^"_$P(ORTEMP,U,9) ; LOS     $G(@DIQ@(.05)) ;status
 . S ^TMP("ORDATA",$J,ORNODE,"WP",9)="9^"_$P(ORTEMP,U,10) ; Type of Insurance       $G(@DIQ@(.05)) ;status
 . S ^TMP("ORDATA",$J,ORNODE,"WP",10)="10^"_$P(ORTEMP,U,11) ; Legal       $G(@DIQ@(.05)) ;status
 . S ^TMP("ORDATA",$J,ORNODE,"WP",11)="11^"_$P(ORTEMP,U,12) ; Authorized Days     $G(@DIQ@(.05)) ;status
 . S ORI=ORI+1
 . S ^XTMP("HDD2")=ORI
 . ;;;;D TGET^TIUSRVR1(.ORGLOBA,$P(ORTEMP,U)) ;Call to get summary text
 . ;;;;D SPMRG^ORDVU($NA(@ORGLOBA),$NA(^TMP("ORDATA",$J,ORNODE,"WP",7)),7) ;summary Text
 . ;;;;;I $O(@ORGLOBA@(0)) S ^TMP("ORDATA",$J,ORNODE,"WP",8)="8^[+]" ;detail flag
 . ;;;;K @ORGLOBA
 K @ORGLOB
 S ROOT=$NA(^TMP("ORDATA",$J))
 Q
TADM ; Admission Summary
 D ENAD(.ORGLOB,ORDBEG,ORDEND,ORMAX)
 ;S ^XTMP("HDD1")=1
 Q