- PSOASAP ;BIRM/MFR - American Society for Automation in Pharmacy (ASAP) Field Values ;09/30/15
- ;;7.0;OUTPATIENT PHARMACY;**451,496,625**;DEC 1997;Build 42
- ;
- ; *** TH Segment - Transaction Header ***
- TH01() ;ASAP Version (3.0, 4.0, 4.1, 4.2, etc.)
- Q PSOASVER
- ;
- TH02() ;ASAP 3.0 : Business Partner Implemetation Version (Not Used)
- ; ASAP 4.0+: Transaction Control Number
- Q $$TH02^PSOASAP0()
- ;
- TH03() ;ASAP 3.0 : Transaction Control Number
- ; ASAP 4.0+: Transaction Type (Always "01" - Send/Request Transaction)
- Q $$TH03^PSOASAP0()
- ;
- TH04() ;ASAP 3.0 : Transaction Type (Not Used)
- ; ASAP 4.0+: Response ID (Not Used)
- Q ""
- ;
- TH05() ;ASAP 3.0 : Message Type (Not Used)
- ; ASAP 4.0+: Creation Date (Format: YYYYMMDD)
- Q $$TH05^PSOASAP0()
- ;
- TH06() ;ASAP 3.0 : Response ID (Not Used)
- ; ASAP 4.0+: Creation Time. Format: HHMMSS or HHMM
- Q $$TH06^PSOASAP0()
- ;
- TH07() ;ASAP 3.0 : Project ID (Not Used)
- ; ASAP 4.0+: File Type. Returns: "T" - Test or "P" - Production
- Q $$TH07^PSOASAP0()
- ;
- TH08() ;ASAP 3.0 : Creation Date (Format: YYYYMMDD)
- ; ASAP 4.0 : Composite Element Separator (:)
- ; ASAP 4.1+: Routing Number (Real-time transactions only)(Not Used)
- Q $$TH08^PSOASAP0()
- ;
- TH09() ;ASAP 3.0 : Creation Time. Format: HHMMSS or HHMM
- ; ASAP 4.0+: Segment Terminator Character
- Q $$TH09^PSOASAP0()
- ;
- TH10() ;ASAP 3.0 : File Type
- ; ASAP 4.0+: N/A
- Q $$TH10^PSOASAP0()
- ;
- TH11() ;ASAP 3.0 : Message (Not Used)
- ; ASAP 4.0+: N/A
- Q ""
- ;
- TH12() ;ASAP 3.0 : Composite Element Separator
- ; ASAP 4.0+: N/A
- Q $$TH12^PSOASAP0()
- ;
- TH13() ;ASAP 3.0 : Data Segment Terminator Character
- ; ASAP 4.0+: N/A
- Q $$TH13^PSOASAP0()
- ;
- ; *** IS Segment - Information Source ***
- IS01() ; Unique Information Source ID
- Q ("VA"_+$$SITE^VASITE())
- ;
- IS02() ; Information Source Entity Name
- Q $$GET1^DIQ(4,+$$SITE^VASITE,100)
- ;
- IS03() ;ASAP 3.0 : Address Information 1 (Not Used)
- ; ASAP 4.0+: Message (Not Used)
- ; ZERO RPT 4.0+: Date Range of Report
- N BEGDATE,ENDDATE,RANGE
- S (BEGDATE,ENDDATE,RANGE)=""
- I $G(BATCHIEN),$$GET1^DIQ(58.42,BATCHIEN,2,"I")="ZR" D Q RANGE
- . S BEGDATE=$$FMTHL7^XLFDT($$GET1^DIQ(58.42,BATCHIEN,4,"I")\1)
- . S ENDDATE=$$FMTHL7^XLFDT($$GET1^DIQ(58.42,BATCHIEN,5,"I")\1)
- . S RANGE="#"_BEGDATE_"#-#"_ENDDATE_"#"
- Q ""
- ;
- IS04() ;ASAP 3.0 : Address Information 2 (Not Used)
- ; ASAP 4.0+: N/A
- Q ""
- ;
- IS05() ;ASAP 3.0 : City Address (Not Used)
- ; ASAP 4.0+: N/A
- Q ""
- ;
- IS06() ;ASAP 3.0 : State Address (Not Used)
- ; ASAP 4.0+: N/A
- Q ""
- ;
- IS07() ;ASAP 3.0 : Zip code Address (Not Used)
- ; ASAP 4.0+: N/A
- Q ""
- ;
- IS08() ;ASAP 3.0 : Phone Number (Not Used)
- ; ASAP 4.0+: N/A
- Q ""
- ;
- IS09() ;ASAP 3.0 : Contact Name (Not Used)
- ; ASAP 4.0+: N/A
- Q ""
- ;
- IS10() ;ASAP 3.0 : Message (Not Used)
- ; ASAP 4.0+: N/A
- Q ""
- ;
- IS11() ;ASAP 3.0 : Data Entry Terminal ID (Not Used)
- ; ASAP 4.0+: N/A
- Q ""
- ;
- ; *** IR Segment - Information Receiver (ASAP 3.0 only) ***
- IR01() ; Unique Information Receiver ID
- Q ("VA"_+$$SITE^VASITE())
- ;
- IR02() ; Information Receiver Entity Name
- Q $$GET1^DIQ(5,STATEIEN,.01)_" PMP PROGRAM"
- ;
- IR03() ;Address Information 1 (Not Used)
- Q ""
- ;
- IR04() ;Address Information 2 (Not Used)
- Q ""
- ;
- IR05() ;City Address (Not Used)
- Q ""
- ;
- IR06() ;State Address (Not Used)
- Q ""
- ;
- IR07() ;Zip code Address (Not Used)
- Q ""
- ;
- IR08() ;Phone Number (Not Used)
- Q ""
- ;
- IR09() ;Contact Name (Not Used)
- Q ""
- ;
- IR10() ;Message (Not Used)
- Q ""
- ;
- ; *** PHA Segment - Pharmacy Header ***
- PHA01() ; National Provider Identifier (NPI)
- Q $$PHA01^PSOASAP0()
- ;
- PHA02() ;NCPDP/NABP Provider ID
- Q $$GET1^DIQ(59,SITEIEN,1008)
- ;
- PHA03() ;Pharmacy DEA Number
- Q $$PHA03^PSOASAP0()
- ;
- PHA04() ;Pharmacy Name
- Q $$GET1^DIQ(59,SITEIEN,.01)
- ;
- PHA05() ;Pharmacy Address Information - Line 1
- Q $$TRIM^XLFSTR($$GET1^DIQ(59,SITEIEN,.02))
- ;
- PHA06() ; Pharmacy Address Information - Line 2 (Not Used)
- Q ""
- ;
- PHA07() ;Pharmacy City Address
- Q $$GET1^DIQ(59,SITEIEN,.07)
- ;
- PHA08() ;Pharmacy State Address
- Q $$GET1^DIQ(5,STATEIEN,1)
- ;
- PHA09() ;Pharmacy ZIP Code
- Q $$NUMERIC^PSOASAP0($$GET1^DIQ(59,SITEIEN,.05))
- ;
- PHA10() ;Phone Number
- Q $$PHA10^PSOASAP0()
- ;
- PHA11() ;Pharmacy Contact name (Not Used)
- Q ""
- ;
- PHA12() ;Pharmacy Chain Site ID (Not Used)
- Q ""
- ;
- PHA13() ;Message (Not Used)
- Q ""
- ;
- ; *** PAT Segment - Patient Information ***
- PAT01() ; ASAP 3.0 : Not Used
- ; ASAP 4.0+: ID Qualifier of Patient Identifier (Always "US" - United States)
- I PSOASVER="3.0" Q ""
- Q "US"
- ;
- PAT02() ;ID Qualifier (Always "07" - Social Security Number)
- Q "07"
- ;
- PAT03() ;ASAP 3.0 : Unique System ID - Patient (Not Used)
- ; ASAP 4.0+: ID of Patient (SSN)
- Q $$PAT03^PSOASAP0()
- ;
- PAT04() ;ASAP 3.0 : SSN
- ; ASAP 4.0+: ID Qualifier of Additional Patient Identifier (Not Used)
- Q $$PAT04^PSOASAP0()
- ;
- PAT05() ;Additional Patient ID Qualifier (Not Used)
- Q ""
- ;
- PAT06() ;Additional ID (Not Used)
- Q ""
- ;
- PAT07() ;Patient Last Name
- Q PSONAME("LAST")
- ;
- PAT08() ;Patient First Name
- Q PSONAME("FIRST")
- ;
- PAT09() ;Patient Middle Name or Initial
- Q PSONAME("MIDDLE")
- ;
- PAT10() ;Name Prefix
- Q PSONAME("PREFIX")
- ;
- PAT11() ;Name Suffix
- Q PSONAME("SUFFIX")
- ;
- PAT12() ;Patient Address Information - Line 1
- Q $$PAT12^PSOASAP0()
- ;
- PAT13() ;Patient Address Information - Line 2
- Q $$PAT13^PSOASAP0()
- ;
- PAT14() ;Patient City Address
- Q $P($G(VAPA(4)),"^",1)
- ;
- PAT15() ;Patient State Address
- Q $$PAT15^PSOASAP0()
- ;
- PAT16() ;Patient ZIP Code
- Q $$PAT16^PSOASAP0()
- ;
- PAT17() ;Patient Phone Number
- Q $$PAT17^PSOASAP0()
- ;
- PAT18() ;ASAP 3.0 : Email Address (Not Used)
- ; ASAP 4.0+: Patient DOB
- Q $$PAT18^PSOASAP0()
- ;
- PAT19() ;ASAP 3.0 : Patient DOB
- ; ASAP 4.0+: Patient Gender Code
- Q $$PAT19^PSOASAP0()
- ;
- PAT20() ;ASAP 3.0 : Patient Gender Code
- ; ASAP 4.0+: Species Code (Always return "01" for 'Human')
- Q $$PAT20^PSOASAP0()
- ;
- PAT21() ;Patient Location Code (Always return "10" for 'Outpatient')
- Q "10"
- ;
- PAT22() ;ASAP 3.0 : Primary Prescription Coverage Type (Not Used)
- ; ASAP 4.0+:Country of Non-U.S. Resident
- Q $$PAT22^PSOASAP0()
- ;
- PAT23() ;ASAP 3.0: Secondary Prescription Coverage Type (Not Used)
- Q ""
- ;
- PAT24() ;ASAP 3.0: Language Code (Not Used)
- Q ""
- ;
- PAT25() ;ASAP 3.0: Work Phone Number (Not Used)
- Q ""
- ;
- PAT26() ;ASAP 3.0: Alternate Phone Number (Not Used)
- Q ""
- ;
- PAT27() ;ASAP 3.0: Drivers License Number
- Q ""
- ;
- PAT28() ;ASAP 3.0: Facility Code (Not Used)
- Q ""
- ;
- PAT29() ;ASAP 3.0: Unit Identifier (Not Used)
- Q ""
- ;
- PAT30() ;ASAP 3.0: Room Number (Not Used)
- Q ""
- ;
- PAT31() ;ASAP 3.0: Bed (Not Used)
- Q ""
- ;
- PAT32() ;ASAP 3.0: Medical Record Number (Not Used)
- Q ""
- ;
- PAT33() ;ASAP 3.0: Admission Date (Not Used)
- Q ""
- ;
- PAT34() ;ASAP 3.0: Admission Time (Not Used)
- Q ""
- ;
- PAT35() ;ASAP 3.0: Discharge Date (Not Used)
- Q ""
- ;
- PAT36() ;ASAP 3.0: Discharge Time (Not Used)
- Q ""
- ;
- PAT37() ;ASAP 3.0: Primary Coverage Start Date (Not Used)
- Q ""
- ;
- PAT38() ;ASAP 3.0: Not Used
- Q ""
- ;
- PAT39() ;ASAP 3.0: Secondary Coverage Start Date (Not Used)
- Q ""
- ;
- PAT40() ;ASAP 3.0: Secondary Coverage Stop Date (Not Used)
- Q ""
- ;
- ; *** RX Segment - Prescription Order (ASAP 3.0 only) ***
- RX01() ;Reporting Status ("01" - Add / "02" - Change / "03" - Delete)
- Q $S($G(RECTYPE)="N":"01",$G(RECTYPE)="R":"02",$G(RECTYPE)="V":"03",1:"")
- ;
- RX02() ;Program Participation Status (Not Used)
- Q ""
- ;
- RX03() ;Prescription Number
- Q $$GET1^DIQ(52,+$G(RXIEN),.01)
- ;
- RX04() ;Unique System ID() - RPh (Not Used)
- Q ""
- ;
- RX05() ;Unique System ID() - Patient (Not Used)
- Q ""
- ;
- RX06() ;Unique System ID() - Prescriber (Not Used)
- Q ""
- ;
- RX07() ;Unique System ID() - Drug (Not Used)
- Q ""
- ;
- RX08() ;Date Rx Written (Format: YYYYMMDD)
- Q $$RX08^PSOASAP0()
- ;
- RX09() ;RX Start Date (Not Used)
- Q ""
- ;
- RX10() ;RX End Date (Not Used)
- Q ""
- ;
- RX11() ;Diagnosis Code Qualifier
- Q ""
- ;
- RX12() ;Diagnosis Code
- Q ""
- ;
- RX13() ;Product ID Qualifier (Always return "01" for 'NDC')
- Q "01"
- ;
- RX14() ;Product ID (NDC - National Drug Code)
- Q $$RX14^PSOASAP0()
- ;
- RX15() ;Product Description (Not Used)
- Q ""
- ;
- RX16() ;DAW Code (Not Used)
- Q ""
- ;
- RX17() ;Quantity Dispensed
- Q $S(RECTYPE="V":$G(RTSDATA("QTY")),1:$$RXQTY^PSOBPSUT(RXIEN,FILLNUM))
- ;
- RX18() ;Days Supply
- Q $S(RECTYPE="V":$G(RTSDATA("DAYSUP")),1:$$RXDAYSUP^PSOBPSUT(RXIEN,FILLNUM))
- ;
- RX19() ;Basis of Days Supply Determination (Not Used)
- Q ""
- ;
- RX20() ;Refills Authorized
- Q +$$GET1^DIQ(52,+$G(RXIEN),9)
- ;
- RX21() ;Refills Authorized Through Date (Not Used)
- Q ""
- ;
- RX22() ;DEA Schedule (Not Used)
- Q ""
- ;
- RX23() ;Unit Dose Indicator (Not Used)
- Q ""
- ;
- RX24() ;Compound Indicator (Not Used)
- Q ""
- ;
- RX25() ;Origin Code (Not Used)
- Q ""
- ;
- RX26() ;Brand Versus Generic Indicator (Not Used)
- Q ""
- ;
- RX27() ;Original Fill Date (Not Used)
- Q ""
- ;
- RX28() ;AlternateRX Identifier (Not Used)
- Q ""
- ;
- RX29() ;Previous RX Number (Not Used)
- Q ""
- ;
- ; *** DSP Segment - Dispensing Record ***
- DSP01() ;ASAP 3.0 : Reporting Status ("01" - Add / "02" - Change / "03" - Delete)
- ; ASAP 4.0 : Reporting Status ("" - New / "01" - Revise / "02" - Void)
- ; ASAP 4.1+: Reporting Status ("00" - New / "01" - Revise / "02" - Void)
- Q $$DSP01^PSOASAP0()
- ;
- DSP02() ;ASAP 3.0 : Program Participation Status (Not Used)
- ; ASAP 4.0+: Prescription Number (Not Used by ASAP 3.0)
- Q $$DSP02^PSOASAP0()
- ;
- DSP03() ;ASAP 3.0 : Prescription Number
- ; ASAP 4.0+: Date Rx Written (Format: YYYYMMDD)
- Q $$DSP03^PSOASAP0()
- ;
- DSP04() ;ASAP 3.0 : Refill Number
- ; ASAP 4.0+: Refills Authorized
- Q $$DSP04^PSOASAP0()
- ;
- DSP05() ;ASAP 3.0 : Unique System ID - RPh (Not Used)
- ; ASAP 4.0+: Date Filled (Release Date) (Format: YYYYMMDD)
- Q $$DSP05^PSOASAP0()
- ;
- DSP06() ;ASAP 3.0 : ;Unique System ID - Patient (Not Used)
- ; ASAP 4.0+: Refill Number (Partials are always "0")
- Q $$DSP06^PSOASAP0()
- ;
- DSP07() ;ASAP 3.0 : ;Unique System ID - Prescriber (Not Used)
- ; ASAP 4.0+: Product ID Qualifier (Always return "01" for 'NDC')
- Q $$DSP07^PSOASAP0()
- ;
- DSP08() ;Product ID (NDC - National Drug Code) (ASAP 3.0: Not Used)
- Q $$DSP08^PSOASAP0()
- ;
- DSP09() ;ASAP 3.0: Date Filled
- ; ASAP 4.0+: Quantity Dispensed
- Q $$DSP09^PSOASAP0()
- ;
- DSP10() ;Days Supply
- Q $$DSP10^PSOASAP0()
- ;
- DSP11() ;ASAP 3.0 : Product ID Qualifier (01:NDC)
- ; ASAP 4.0+: Drug Dosage Units Code
- Q $$DSP11^PSOASAP0()
- ;
- DSP12() ;ASAP 3.0: Product ID (NDC)
- ; ASAP 4.0+: Transmission Form of Rx Origin Code (Nature of Order)
- Q $$DSP12^PSOASAP0()
- ;
- DSP13() ;ASAP 3.0 : Product Description (Not Used)
- ; ASAP 4.0+: Partial Fill Indicator
- Q $$DSP13^PSOASAP0()
- ;
- DSP14() ;ASAP 3.0 : Quantity Dispensed
- ; ASAP 4.0+: Pharmacist National Provider Identifier (NPI)
- Q $$DSP14^PSOASAP0()
- ;
- DSP15() ;ASAP 3.0 : Days Supply
- ; ASAP 4.0+: Pharmacist State License Number (Not Used)
- Q $$DSP15^PSOASAP0()
- ;
- DSP16() ;ASAP 3.0 : Basis of Days Supply Determiniation (Always "3" for 'As directed by doctor')
- ; ASAP 4.0+: Classification Code for Payment Type (Always return "05" for 'Military Installations and VA')
- Q $$DSP16^PSOASAP0()
- ;
- DSP17() ;ASAP 3.0 : Refills Remaining (Not Used)
- ; ASAP 4.0 : N/A (up to DSP16 only)
- ; ASAP 4.1+: Date Sold
- Q $$DSP17^PSOASAP0()
- ;
- DSP18() ;ASAP 3.0: Refills Authorized Through Date (Not Used)
- ; ASAP 4.1: RxNorm Code (Not Used)
- ; ASAP 4.2: RxNorm Product Qualifier (Not Used)
- Q ""
- ;
- DSP19() ;ASAP 3.0: Previous Fill Date (Not Used)
- ; ASAP 4.1: Electronic Prescription Reference Number (Not Used)
- ; ASAP 4.2: RxNorm Code (Not Used)
- Q ""
- ;
- DSP20() ;ASAP 3.0: Previous Fill Quantity Dispensed (Not Used)
- ; ASAP 4.2: Electronic Prescription Reference Number (Not Used)
- Q ""
- ;
- DSP21() ;ASAP 3.0: Level of Service Code (Not Used)
- ; ASAP 4.2: Electronic Prescription Order Number (Not Used)
- Q ""
- ;
- DSP22() ;ASAP 3.0: Brand or Generic Indicator (Not Used)
- Q ""
- ;
- DSP23() ;ASAP 3.0: Patient Advisory Leaflet (Not Used)
- Q ""
- ;
- DSP24() ;ASAP 3.0: Warning/Auxiliary Labels (Not Used)
- Q ""
- ;
- DSP25() ;ASAP 3.0: Warning/Auxiliary Labels (Not Used)
- Q ""
- ;
- DSP26() ;ASAP 3.0: Warning/Auxiliary Labels (Not Used)
- Q ""
- ;
- DSP27() ;ASAP 3.0: Warning/Auxiliary Labels (Not Used)
- Q ""
- ;
- DSP28() ;ASAP 3.0: Warning/Auxiliary Labels (Not Used)
- Q ""
- ;
- DSP29() ;ASAP 3.0: Bar Code on Vial Label (Not Used)
- Q ""
- ;
- DSP30() ;ASAP 3.0: Group Identifier (Not Used)
- Q ""
- ;
- DSP31() ;ASAP 3.0: Group Rx Count (Not Used)
- Q ""
- ;
- DSP32() ;ASAP 3.0: Partial Fill Indicator (Not Used)
- Q ""
- ;
- DSP33() ;ASAP 3.0: Priority (Not Used)
- Q ""
- ;
- ; *** PRE Segment - Prescriber Information ***
- PRE01() ;ASAP 3.0 : Not Used
- ; ASAP 4.0+: Prescriber National Provider Identifier (NPI)
- Q $$PRE01^PSOASAP0()
- ;
- PRE02() ; Prescriber DEA Number
- Q $$PRE02^PSOASAP0()
- ;
- PRE03() ;ASAP 3.0 : Prescriber NPI
- ; ASAP 4.0+: Prescriber DEA Number Suffix
- Q $$PRE03^PSOASAP0()
- ;
- PRE04() ;ASAP 3.0 : Prescriber DEA Number
- ; ASAP 4.0+: Prescriber State License Number (Not Used)
- Q $$PRE04^PSOASAP0()
- ;
- PRE05() ;ASAP 3.0 : Prescriber DEA Number Suffix
- ; ASAP 4.0+: Prescriber Last Name
- Q $$PRE05^PSOASAP0()
- ;
- PRE06() ;ASAP 3.0 : Prescriber State Lince Number (Not Used)
- ; ASAP 4.0+: Prescriber First Name
- Q $$PRE06^PSOASAP0()
- ;
- PRE07() ;ASAP 3.0 : Prescriber Alternate ID (Not Used)
- ; ASAP 4.0+: Prescriber Middle Name
- Q $$PRE07^PSOASAP0()
- ;
- PRE08() ;ASAP 3.0 : Prescriber's Last Name
- ; ASAP 4.0 & 4.1: N/A (Up to PRE07 only)
- ; ASAP 4.2: Prescriber's Phone Number
- Q $$PRE08^PSOASAP0()
- ;
- PRE09() ;ASAP 3.0: Prescriber' First Name
- Q $$PRE09^PSOASAP0()
- ;
- PRE10() ;ASAP 3.0: Prescriber' Middle Name
- Q $$PRE10^PSOASAP0()
- ;
- PRE11() ;ASAP 3.0: Name Prefix (Not Used)
- Q ""
- ;
- PRE12() ;ASAP 3.0: Name Suffix (Not Used)
- Q ""
- ;
- PRE13() ;ASAP 3.0: Address Information - 1 (Not Used)
- Q ""
- ;
- PRE14() ;ASAP 3.0: Address Information - 2 (Not Used)
- Q ""
- ;
- PRE15() ;ASAP 3.0: City Address (Not Used)
- Q ""
- ;
- PRE16() ;ASAP 3.0: State Address (Not Used)
- Q ""
- ;
- PRE17() ;ASAP 3.0: Zip Code Address (Not Used)
- Q ""
- ;
- PRE18() ;ASAP 3.0: Phone Number (Not Used)
- Q ""
- ;
- PRE19() ;ASAP 3.0: Prescriber Specialty (Not Used)
- Q ""
- ;
- PRE20() ;ASAP 3.0: Prescriber Fax Number (Not Used)
- Q ""
- ;
- ; *** CDI Segment - Compound Drug Ingredient Detail ***
- CDI01() ;Compound Drug Ingredient Sequence Number (Not Used)
- Q ""
- ;
- CDI02() ;Product ID Qualifier (Not Used)
- Q ""
- ;
- CDI03() ;Product ID (Not Used)
- Q ""
- ;
- CDI04() ;Component Ingredient Product Description (Not Used)
- Q ""
- ;
- CDI05() ;Component Ingredient Quantity (Not Used)
- Q ""
- ;
- CDI06() ;ASAP 3.0: Component Ingredient Cost (Not Used)
- Q ""
- ;
- CDI07() ;ASAP 3.0: Component Ingredient Basis of Cost Determination (Not Used)
- Q ""
- ;
- CDI08() ;ASAP 3.0: Compound Drug Dosage Units Code (Not Used)
- Q ""
- ;
- ; *** CSR Segment - Controlled Substance Reporting (ASAP 3.0 only) ***
- CSR01() ;State Issuing Rx Serial Number (Not Used)
- Q ""
- ;
- CSR02() ;State Issued Rx Serial Number (Not Used)
- Q ""
- ;
- CSR03() ;ID Qualifier (Not Used)
- Q ""
- ;
- CSR04() ;ID of Person Picking Up Rx (Not Used)
- Q ""
- ;
- CSR05() ;Relationship of Person Picking Up Rx (Not Used)
- Q ""
- ;
- CSR06() ;Last Name of Person Picking Up Rx (Not Used)
- Q ""
- ;
- CSR07() ;First Name of Person Picking Up Rx (Not Used)
- Q ""
- ;
- ; *** AIR Segment - Additional Information Reporting (Not Used by ASAP 3.0) ***
- AIR01() ;State Issuing Rx Serial Number (Not Used)
- Q ""
- ;
- AIR02() ;State Issued Rx Serial Number (Not Used)
- Q ""
- ;
- AIR03() ;Issuing Jurisdiction (Not Used)
- Q ""
- ;
- AIR04() ;ID Qualifier of Person Dropping Off or Picking Up Rx (Not Used)
- Q ""
- ;
- AIR05() ;ID of Person Dropping Off or Picking Up Rx (Not Used)
- Q ""
- ;
- AIR06() ;Relationship of Person Dropping Off or Picking Up Rx (Not Used)
- Q ""
- ;
- AIR07() ;Last Name of Person Dropping Off or Picking Up Rx (Not Used)
- Q ""
- ;
- AIR08() ;First Name of Person Dropping Off or Picking Up Rx (Not Used)
- Q ""
- ;
- AIR09() ;Last Name or Initials of Pharmacist (Not Used)
- Q ""
- ;
- AIR10() ;First Name of Pharmacist (Not Used)
- Q ""
- ;
- AIR11() ;ASAP 4.2: Dropping Off/Picking Up Identifier Qualifier
- Q ""
- ;
- ; *** RPH Segment - Pharmacist Information (ASAP 3.0 Only) ***
- RPH01() ;Reporting Status (Not Used)
- Q ""
- ;
- RPH02() ;Unique System ID (Not Used)
- Q ""
- ;
- RPH03() ;National Provider Identification (NPI)
- Q $$RPH03^PSOASAP0()
- ;
- RPH04() ;Pharmacist State License Number (Not Used)
- Q ""
- ;
- RPH05() ;Pharmacist Alternate ID (Not Used)
- Q ""
- ;
- RPH06() ;Pharmacist Last Name
- Q $$RPH06^PSOASAP0()
- ;
- RPH07() ;Pharmacist First Name
- Q $$RPH07^PSOASAP0()
- ;
- RPH08() ;Pharmacist Middle Name
- Q $$RPH08^PSOASAP0()
- ;
- RPH09() ;Name Prefix (Not Used)
- Q ""
- ;
- RPH10() ;Name Suffix (Not Used)
- Q ""
- ;
- RPH11() ;Pharmacist Title (Not Used)
- Q ""
- ;
- ; *** PLN Segment - Third-Party Plan (ASAP 3.0 Only) ***
- PLN01() ;Reporting Status (Not Used)
- Q ""
- ;
- PLN02() ;Plan Coverage Status to Patient (Not Used)
- Q ""
- ;
- PLN03() ;Unique System ID - Plan (Not Used)
- Q ""
- ;
- PLN04() ;Classification Code for Plan Type (Not Used)
- Q ""
- ;
- PLN05() ;Plan Name (Not Used)
- Q ""
- ;
- PLN06() ;Processor BIN (Not Used)
- Q ""
- ;
- PLN07() ;Processor Control Number (Not Used)
- Q ""
- ;
- PLN08() ;Plan ID (Not Used)
- Q ""
- ;
- PLN09() ;Group Number (Not Used)
- Q ""
- ;
- PLN10() ;Cardholder ID (Not Used)
- Q ""
- ;
- PLN11() ;Person Code (Not Used)
- Q ""
- ;
- PLN12() ;Relationship Code (Not Used)
- Q ""
- ;
- ; *** TP Segment - Pharmacy Trailer ***
- TP01() ;Detail Segment Count
- Q PSOTPCNT
;
; *** TT Segment - Transaction Set Trailer ***
TT01() ;Transaction Control Number
; ASAP 3.0 : Same as TH03
; ASAP 4.0+: Same as TH02
Q $$TT01^PSOASAP0()
;
TT02() ;Segment Count
Q $G(PSOTTCNT)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSOASAP 18511 printed Dec 13, 2024@02:24:27 Page 2
PSOASAP ;BIRM/MFR - American Society for Automation in Pharmacy (ASAP) Field Values ;09/30/15
+1 ;;7.0;OUTPATIENT PHARMACY;**451,496,625**;DEC 1997;Build 42
+2 ;
+3 ; *** TH Segment - Transaction Header ***
TH01() ;ASAP Version (3.0, 4.0, 4.1, 4.2, etc.)
+1 QUIT PSOASVER
+2 ;
TH02() ;ASAP 3.0 : Business Partner Implemetation Version (Not Used)
+1 ; ASAP 4.0+: Transaction Control Number
+2 QUIT $$TH02^PSOASAP0()
+3 ;
TH03() ;ASAP 3.0 : Transaction Control Number
+1 ; ASAP 4.0+: Transaction Type (Always "01" - Send/Request Transaction)
+2 QUIT $$TH03^PSOASAP0()
+3 ;
TH04() ;ASAP 3.0 : Transaction Type (Not Used)
+1 ; ASAP 4.0+: Response ID (Not Used)
+2 QUIT ""
+3 ;
TH05() ;ASAP 3.0 : Message Type (Not Used)
+1 ; ASAP 4.0+: Creation Date (Format: YYYYMMDD)
+2 QUIT $$TH05^PSOASAP0()
+3 ;
TH06() ;ASAP 3.0 : Response ID (Not Used)
+1 ; ASAP 4.0+: Creation Time. Format: HHMMSS or HHMM
+2 QUIT $$TH06^PSOASAP0()
+3 ;
TH07() ;ASAP 3.0 : Project ID (Not Used)
+1 ; ASAP 4.0+: File Type. Returns: "T" - Test or "P" - Production
+2 QUIT $$TH07^PSOASAP0()
+3 ;
TH08() ;ASAP 3.0 : Creation Date (Format: YYYYMMDD)
+1 ; ASAP 4.0 : Composite Element Separator (:)
+2 ; ASAP 4.1+: Routing Number (Real-time transactions only)(Not Used)
+3 QUIT $$TH08^PSOASAP0()
+4 ;
TH09() ;ASAP 3.0 : Creation Time. Format: HHMMSS or HHMM
+1 ; ASAP 4.0+: Segment Terminator Character
+2 QUIT $$TH09^PSOASAP0()
+3 ;
TH10() ;ASAP 3.0 : File Type
+1 ; ASAP 4.0+: N/A
+2 QUIT $$TH10^PSOASAP0()
+3 ;
TH11() ;ASAP 3.0 : Message (Not Used)
+1 ; ASAP 4.0+: N/A
+2 QUIT ""
+3 ;
TH12() ;ASAP 3.0 : Composite Element Separator
+1 ; ASAP 4.0+: N/A
+2 QUIT $$TH12^PSOASAP0()
+3 ;
TH13() ;ASAP 3.0 : Data Segment Terminator Character
+1 ; ASAP 4.0+: N/A
+2 QUIT $$TH13^PSOASAP0()
+3 ;
+4 ; *** IS Segment - Information Source ***
IS01() ; Unique Information Source ID
+1 QUIT ("VA"_+$$SITE^VASITE())
+2 ;
IS02() ; Information Source Entity Name
+1 QUIT $$GET1^DIQ(4,+$$SITE^VASITE,100)
+2 ;
IS03() ;ASAP 3.0 : Address Information 1 (Not Used)
+1 ; ASAP 4.0+: Message (Not Used)
+2 ; ZERO RPT 4.0+: Date Range of Report
+3 NEW BEGDATE,ENDDATE,RANGE
+4 SET (BEGDATE,ENDDATE,RANGE)=""
+5 IF $GET(BATCHIEN)
IF $$GET1^DIQ(58.42,BATCHIEN,2,"I")="ZR"
Begin DoDot:1
+6 SET BEGDATE=$$FMTHL7^XLFDT($$GET1^DIQ(58.42,BATCHIEN,4,"I")\1)
+7 SET ENDDATE=$$FMTHL7^XLFDT($$GET1^DIQ(58.42,BATCHIEN,5,"I")\1)
+8 SET RANGE="#"_BEGDATE_"#-#"_ENDDATE_"#"
End DoDot:1
QUIT RANGE
+9 QUIT ""
+10 ;
IS04() ;ASAP 3.0 : Address Information 2 (Not Used)
+1 ; ASAP 4.0+: N/A
+2 QUIT ""
+3 ;
IS05() ;ASAP 3.0 : City Address (Not Used)
+1 ; ASAP 4.0+: N/A
+2 QUIT ""
+3 ;
IS06() ;ASAP 3.0 : State Address (Not Used)
+1 ; ASAP 4.0+: N/A
+2 QUIT ""
+3 ;
IS07() ;ASAP 3.0 : Zip code Address (Not Used)
+1 ; ASAP 4.0+: N/A
+2 QUIT ""
+3 ;
IS08() ;ASAP 3.0 : Phone Number (Not Used)
+1 ; ASAP 4.0+: N/A
+2 QUIT ""
+3 ;
IS09() ;ASAP 3.0 : Contact Name (Not Used)
+1 ; ASAP 4.0+: N/A
+2 QUIT ""
+3 ;
IS10() ;ASAP 3.0 : Message (Not Used)
+1 ; ASAP 4.0+: N/A
+2 QUIT ""
+3 ;
IS11() ;ASAP 3.0 : Data Entry Terminal ID (Not Used)
+1 ; ASAP 4.0+: N/A
+2 QUIT ""
+3 ;
+4 ; *** IR Segment - Information Receiver (ASAP 3.0 only) ***
IR01() ; Unique Information Receiver ID
+1 QUIT ("VA"_+$$SITE^VASITE())
+2 ;
IR02() ; Information Receiver Entity Name
+1 QUIT $$GET1^DIQ(5,STATEIEN,.01)_" PMP PROGRAM"
+2 ;
IR03() ;Address Information 1 (Not Used)
+1 QUIT ""
+2 ;
IR04() ;Address Information 2 (Not Used)
+1 QUIT ""
+2 ;
IR05() ;City Address (Not Used)
+1 QUIT ""
+2 ;
IR06() ;State Address (Not Used)
+1 QUIT ""
+2 ;
IR07() ;Zip code Address (Not Used)
+1 QUIT ""
+2 ;
IR08() ;Phone Number (Not Used)
+1 QUIT ""
+2 ;
IR09() ;Contact Name (Not Used)
+1 QUIT ""
+2 ;
IR10() ;Message (Not Used)
+1 QUIT ""
+2 ;
+3 ; *** PHA Segment - Pharmacy Header ***
PHA01() ; National Provider Identifier (NPI)
+1 QUIT $$PHA01^PSOASAP0()
+2 ;
PHA02() ;NCPDP/NABP Provider ID
+1 QUIT $$GET1^DIQ(59,SITEIEN,1008)
+2 ;
PHA03() ;Pharmacy DEA Number
+1 QUIT $$PHA03^PSOASAP0()
+2 ;
PHA04() ;Pharmacy Name
+1 QUIT $$GET1^DIQ(59,SITEIEN,.01)
+2 ;
PHA05() ;Pharmacy Address Information - Line 1
+1 QUIT $$TRIM^XLFSTR($$GET1^DIQ(59,SITEIEN,.02))
+2 ;
PHA06() ; Pharmacy Address Information - Line 2 (Not Used)
+1 QUIT ""
+2 ;
PHA07() ;Pharmacy City Address
+1 QUIT $$GET1^DIQ(59,SITEIEN,.07)
+2 ;
PHA08() ;Pharmacy State Address
+1 QUIT $$GET1^DIQ(5,STATEIEN,1)
+2 ;
PHA09() ;Pharmacy ZIP Code
+1 QUIT $$NUMERIC^PSOASAP0($$GET1^DIQ(59,SITEIEN,.05))
+2 ;
PHA10() ;Phone Number
+1 QUIT $$PHA10^PSOASAP0()
+2 ;
PHA11() ;Pharmacy Contact name (Not Used)
+1 QUIT ""
+2 ;
PHA12() ;Pharmacy Chain Site ID (Not Used)
+1 QUIT ""
+2 ;
PHA13() ;Message (Not Used)
+1 QUIT ""
+2 ;
+3 ; *** PAT Segment - Patient Information ***
PAT01() ; ASAP 3.0 : Not Used
+1 ; ASAP 4.0+: ID Qualifier of Patient Identifier (Always "US" - United States)
+2 IF PSOASVER="3.0"
QUIT ""
+3 QUIT "US"
+4 ;
PAT02() ;ID Qualifier (Always "07" - Social Security Number)
+1 QUIT "07"
+2 ;
PAT03() ;ASAP 3.0 : Unique System ID - Patient (Not Used)
+1 ; ASAP 4.0+: ID of Patient (SSN)
+2 QUIT $$PAT03^PSOASAP0()
+3 ;
PAT04() ;ASAP 3.0 : SSN
+1 ; ASAP 4.0+: ID Qualifier of Additional Patient Identifier (Not Used)
+2 QUIT $$PAT04^PSOASAP0()
+3 ;
PAT05() ;Additional Patient ID Qualifier (Not Used)
+1 QUIT ""
+2 ;
PAT06() ;Additional ID (Not Used)
+1 QUIT ""
+2 ;
PAT07() ;Patient Last Name
+1 QUIT PSONAME("LAST")
+2 ;
PAT08() ;Patient First Name
+1 QUIT PSONAME("FIRST")
+2 ;
PAT09() ;Patient Middle Name or Initial
+1 QUIT PSONAME("MIDDLE")
+2 ;
PAT10() ;Name Prefix
+1 QUIT PSONAME("PREFIX")
+2 ;
PAT11() ;Name Suffix
+1 QUIT PSONAME("SUFFIX")
+2 ;
PAT12() ;Patient Address Information - Line 1
+1 QUIT $$PAT12^PSOASAP0()
+2 ;
PAT13() ;Patient Address Information - Line 2
+1 QUIT $$PAT13^PSOASAP0()
+2 ;
PAT14() ;Patient City Address
+1 QUIT $PIECE($GET(VAPA(4)),"^",1)
+2 ;
PAT15() ;Patient State Address
+1 QUIT $$PAT15^PSOASAP0()
+2 ;
PAT16() ;Patient ZIP Code
+1 QUIT $$PAT16^PSOASAP0()
+2 ;
PAT17() ;Patient Phone Number
+1 QUIT $$PAT17^PSOASAP0()
+2 ;
PAT18() ;ASAP 3.0 : Email Address (Not Used)
+1 ; ASAP 4.0+: Patient DOB
+2 QUIT $$PAT18^PSOASAP0()
+3 ;
PAT19() ;ASAP 3.0 : Patient DOB
+1 ; ASAP 4.0+: Patient Gender Code
+2 QUIT $$PAT19^PSOASAP0()
+3 ;
PAT20() ;ASAP 3.0 : Patient Gender Code
+1 ; ASAP 4.0+: Species Code (Always return "01" for 'Human')
+2 QUIT $$PAT20^PSOASAP0()
+3 ;
PAT21() ;Patient Location Code (Always return "10" for 'Outpatient')
+1 QUIT "10"
+2 ;
PAT22() ;ASAP 3.0 : Primary Prescription Coverage Type (Not Used)
+1 ; ASAP 4.0+:Country of Non-U.S. Resident
+2 QUIT $$PAT22^PSOASAP0()
+3 ;
PAT23() ;ASAP 3.0: Secondary Prescription Coverage Type (Not Used)
+1 QUIT ""
+2 ;
PAT24() ;ASAP 3.0: Language Code (Not Used)
+1 QUIT ""
+2 ;
PAT25() ;ASAP 3.0: Work Phone Number (Not Used)
+1 QUIT ""
+2 ;
PAT26() ;ASAP 3.0: Alternate Phone Number (Not Used)
+1 QUIT ""
+2 ;
PAT27() ;ASAP 3.0: Drivers License Number
+1 QUIT ""
+2 ;
PAT28() ;ASAP 3.0: Facility Code (Not Used)
+1 QUIT ""
+2 ;
PAT29() ;ASAP 3.0: Unit Identifier (Not Used)
+1 QUIT ""
+2 ;
PAT30() ;ASAP 3.0: Room Number (Not Used)
+1 QUIT ""
+2 ;
PAT31() ;ASAP 3.0: Bed (Not Used)
+1 QUIT ""
+2 ;
PAT32() ;ASAP 3.0: Medical Record Number (Not Used)
+1 QUIT ""
+2 ;
PAT33() ;ASAP 3.0: Admission Date (Not Used)
+1 QUIT ""
+2 ;
PAT34() ;ASAP 3.0: Admission Time (Not Used)
+1 QUIT ""
+2 ;
PAT35() ;ASAP 3.0: Discharge Date (Not Used)
+1 QUIT ""
+2 ;
PAT36() ;ASAP 3.0: Discharge Time (Not Used)
+1 QUIT ""
+2 ;
PAT37() ;ASAP 3.0: Primary Coverage Start Date (Not Used)
+1 QUIT ""
+2 ;
PAT38() ;ASAP 3.0: Not Used
+1 QUIT ""
+2 ;
PAT39() ;ASAP 3.0: Secondary Coverage Start Date (Not Used)
+1 QUIT ""
+2 ;
PAT40() ;ASAP 3.0: Secondary Coverage Stop Date (Not Used)
+1 QUIT ""
+2 ;
+3 ; *** RX Segment - Prescription Order (ASAP 3.0 only) ***
RX01() ;Reporting Status ("01" - Add / "02" - Change / "03" - Delete)
+1 QUIT $SELECT($GET(RECTYPE)="N":"01",$GET(RECTYPE)="R":"02",$GET(RECTYPE)="V":"03",1:"")
+2 ;
RX02() ;Program Participation Status (Not Used)
+1 QUIT ""
+2 ;
RX03() ;Prescription Number
+1 QUIT $$GET1^DIQ(52,+$GET(RXIEN),.01)
+2 ;
RX04() ;Unique System ID() - RPh (Not Used)
+1 QUIT ""
+2 ;
RX05() ;Unique System ID() - Patient (Not Used)
+1 QUIT ""
+2 ;
RX06() ;Unique System ID() - Prescriber (Not Used)
+1 QUIT ""
+2 ;
RX07() ;Unique System ID() - Drug (Not Used)
+1 QUIT ""
+2 ;
RX08() ;Date Rx Written (Format: YYYYMMDD)
+1 QUIT $$RX08^PSOASAP0()
+2 ;
RX09() ;RX Start Date (Not Used)
+1 QUIT ""
+2 ;
RX10() ;RX End Date (Not Used)
+1 QUIT ""
+2 ;
RX11() ;Diagnosis Code Qualifier
+1 QUIT ""
+2 ;
RX12() ;Diagnosis Code
+1 QUIT ""
+2 ;
RX13() ;Product ID Qualifier (Always return "01" for 'NDC')
+1 QUIT "01"
+2 ;
RX14() ;Product ID (NDC - National Drug Code)
+1 QUIT $$RX14^PSOASAP0()
+2 ;
RX15() ;Product Description (Not Used)
+1 QUIT ""
+2 ;
RX16() ;DAW Code (Not Used)
+1 QUIT ""
+2 ;
RX17() ;Quantity Dispensed
+1 QUIT $SELECT(RECTYPE="V":$GET(RTSDATA("QTY")),1:$$RXQTY^PSOBPSUT(RXIEN,FILLNUM))
+2 ;
RX18() ;Days Supply
+1 QUIT $SELECT(RECTYPE="V":$GET(RTSDATA("DAYSUP")),1:$$RXDAYSUP^PSOBPSUT(RXIEN,FILLNUM))
+2 ;
RX19() ;Basis of Days Supply Determination (Not Used)
+1 QUIT ""
+2 ;
RX20() ;Refills Authorized
+1 QUIT +$$GET1^DIQ(52,+$GET(RXIEN),9)
+2 ;
RX21() ;Refills Authorized Through Date (Not Used)
+1 QUIT ""
+2 ;
RX22() ;DEA Schedule (Not Used)
+1 QUIT ""
+2 ;
RX23() ;Unit Dose Indicator (Not Used)
+1 QUIT ""
+2 ;
RX24() ;Compound Indicator (Not Used)
+1 QUIT ""
+2 ;
RX25() ;Origin Code (Not Used)
+1 QUIT ""
+2 ;
RX26() ;Brand Versus Generic Indicator (Not Used)
+1 QUIT ""
+2 ;
RX27() ;Original Fill Date (Not Used)
+1 QUIT ""
+2 ;
RX28() ;AlternateRX Identifier (Not Used)
+1 QUIT ""
+2 ;
RX29() ;Previous RX Number (Not Used)
+1 QUIT ""
+2 ;
+3 ; *** DSP Segment - Dispensing Record ***
DSP01() ;ASAP 3.0 : Reporting Status ("01" - Add / "02" - Change / "03" - Delete)
+1 ; ASAP 4.0 : Reporting Status ("" - New / "01" - Revise / "02" - Void)
+2 ; ASAP 4.1+: Reporting Status ("00" - New / "01" - Revise / "02" - Void)
+3 QUIT $$DSP01^PSOASAP0()
+4 ;
DSP02() ;ASAP 3.0 : Program Participation Status (Not Used)
+1 ; ASAP 4.0+: Prescription Number (Not Used by ASAP 3.0)
+2 QUIT $$DSP02^PSOASAP0()
+3 ;
DSP03() ;ASAP 3.0 : Prescription Number
+1 ; ASAP 4.0+: Date Rx Written (Format: YYYYMMDD)
+2 QUIT $$DSP03^PSOASAP0()
+3 ;
DSP04() ;ASAP 3.0 : Refill Number
+1 ; ASAP 4.0+: Refills Authorized
+2 QUIT $$DSP04^PSOASAP0()
+3 ;
DSP05() ;ASAP 3.0 : Unique System ID - RPh (Not Used)
+1 ; ASAP 4.0+: Date Filled (Release Date) (Format: YYYYMMDD)
+2 QUIT $$DSP05^PSOASAP0()
+3 ;
DSP06() ;ASAP 3.0 : ;Unique System ID - Patient (Not Used)
+1 ; ASAP 4.0+: Refill Number (Partials are always "0")
+2 QUIT $$DSP06^PSOASAP0()
+3 ;
DSP07() ;ASAP 3.0 : ;Unique System ID - Prescriber (Not Used)
+1 ; ASAP 4.0+: Product ID Qualifier (Always return "01" for 'NDC')
+2 QUIT $$DSP07^PSOASAP0()
+3 ;
DSP08() ;Product ID (NDC - National Drug Code) (ASAP 3.0: Not Used)
+1 QUIT $$DSP08^PSOASAP0()
+2 ;
DSP09() ;ASAP 3.0: Date Filled
+1 ; ASAP 4.0+: Quantity Dispensed
+2 QUIT $$DSP09^PSOASAP0()
+3 ;
DSP10() ;Days Supply
+1 QUIT $$DSP10^PSOASAP0()
+2 ;
DSP11() ;ASAP 3.0 : Product ID Qualifier (01:NDC)
+1 ; ASAP 4.0+: Drug Dosage Units Code
+2 QUIT $$DSP11^PSOASAP0()
+3 ;
DSP12() ;ASAP 3.0: Product ID (NDC)
+1 ; ASAP 4.0+: Transmission Form of Rx Origin Code (Nature of Order)
+2 QUIT $$DSP12^PSOASAP0()
+3 ;
DSP13() ;ASAP 3.0 : Product Description (Not Used)
+1 ; ASAP 4.0+: Partial Fill Indicator
+2 QUIT $$DSP13^PSOASAP0()
+3 ;
DSP14() ;ASAP 3.0 : Quantity Dispensed
+1 ; ASAP 4.0+: Pharmacist National Provider Identifier (NPI)
+2 QUIT $$DSP14^PSOASAP0()
+3 ;
DSP15() ;ASAP 3.0 : Days Supply
+1 ; ASAP 4.0+: Pharmacist State License Number (Not Used)
+2 QUIT $$DSP15^PSOASAP0()
+3 ;
DSP16() ;ASAP 3.0 : Basis of Days Supply Determiniation (Always "3" for 'As directed by doctor')
+1 ; ASAP 4.0+: Classification Code for Payment Type (Always return "05" for 'Military Installations and VA')
+2 QUIT $$DSP16^PSOASAP0()
+3 ;
DSP17() ;ASAP 3.0 : Refills Remaining (Not Used)
+1 ; ASAP 4.0 : N/A (up to DSP16 only)
+2 ; ASAP 4.1+: Date Sold
+3 QUIT $$DSP17^PSOASAP0()
+4 ;
DSP18() ;ASAP 3.0: Refills Authorized Through Date (Not Used)
+1 ; ASAP 4.1: RxNorm Code (Not Used)
+2 ; ASAP 4.2: RxNorm Product Qualifier (Not Used)
+3 QUIT ""
+4 ;
DSP19() ;ASAP 3.0: Previous Fill Date (Not Used)
+1 ; ASAP 4.1: Electronic Prescription Reference Number (Not Used)
+2 ; ASAP 4.2: RxNorm Code (Not Used)
+3 QUIT ""
+4 ;
DSP20() ;ASAP 3.0: Previous Fill Quantity Dispensed (Not Used)
+1 ; ASAP 4.2: Electronic Prescription Reference Number (Not Used)
+2 QUIT ""
+3 ;
DSP21() ;ASAP 3.0: Level of Service Code (Not Used)
+1 ; ASAP 4.2: Electronic Prescription Order Number (Not Used)
+2 QUIT ""
+3 ;
DSP22() ;ASAP 3.0: Brand or Generic Indicator (Not Used)
+1 QUIT ""
+2 ;
DSP23() ;ASAP 3.0: Patient Advisory Leaflet (Not Used)
+1 QUIT ""
+2 ;
DSP24() ;ASAP 3.0: Warning/Auxiliary Labels (Not Used)
+1 QUIT ""
+2 ;
DSP25() ;ASAP 3.0: Warning/Auxiliary Labels (Not Used)
+1 QUIT ""
+2 ;
DSP26() ;ASAP 3.0: Warning/Auxiliary Labels (Not Used)
+1 QUIT ""
+2 ;
DSP27() ;ASAP 3.0: Warning/Auxiliary Labels (Not Used)
+1 QUIT ""
+2 ;
DSP28() ;ASAP 3.0: Warning/Auxiliary Labels (Not Used)
+1 QUIT ""
+2 ;
DSP29() ;ASAP 3.0: Bar Code on Vial Label (Not Used)
+1 QUIT ""
+2 ;
DSP30() ;ASAP 3.0: Group Identifier (Not Used)
+1 QUIT ""
+2 ;
DSP31() ;ASAP 3.0: Group Rx Count (Not Used)
+1 QUIT ""
+2 ;
DSP32() ;ASAP 3.0: Partial Fill Indicator (Not Used)
+1 QUIT ""
+2 ;
DSP33() ;ASAP 3.0: Priority (Not Used)
+1 QUIT ""
+2 ;
+3 ; *** PRE Segment - Prescriber Information ***
PRE01() ;ASAP 3.0 : Not Used
+1 ; ASAP 4.0+: Prescriber National Provider Identifier (NPI)
+2 QUIT $$PRE01^PSOASAP0()
+3 ;
PRE02() ; Prescriber DEA Number
+1 QUIT $$PRE02^PSOASAP0()
+2 ;
PRE03() ;ASAP 3.0 : Prescriber NPI
+1 ; ASAP 4.0+: Prescriber DEA Number Suffix
+2 QUIT $$PRE03^PSOASAP0()
+3 ;
PRE04() ;ASAP 3.0 : Prescriber DEA Number
+1 ; ASAP 4.0+: Prescriber State License Number (Not Used)
+2 QUIT $$PRE04^PSOASAP0()
+3 ;
PRE05() ;ASAP 3.0 : Prescriber DEA Number Suffix
+1 ; ASAP 4.0+: Prescriber Last Name
+2 QUIT $$PRE05^PSOASAP0()
+3 ;
PRE06() ;ASAP 3.0 : Prescriber State Lince Number (Not Used)
+1 ; ASAP 4.0+: Prescriber First Name
+2 QUIT $$PRE06^PSOASAP0()
+3 ;
PRE07() ;ASAP 3.0 : Prescriber Alternate ID (Not Used)
+1 ; ASAP 4.0+: Prescriber Middle Name
+2 QUIT $$PRE07^PSOASAP0()
+3 ;
PRE08() ;ASAP 3.0 : Prescriber's Last Name
+1 ; ASAP 4.0 & 4.1: N/A (Up to PRE07 only)
+2 ; ASAP 4.2: Prescriber's Phone Number
+3 QUIT $$PRE08^PSOASAP0()
+4 ;
PRE09() ;ASAP 3.0: Prescriber' First Name
+1 QUIT $$PRE09^PSOASAP0()
+2 ;
PRE10() ;ASAP 3.0: Prescriber' Middle Name
+1 QUIT $$PRE10^PSOASAP0()
+2 ;
PRE11() ;ASAP 3.0: Name Prefix (Not Used)
+1 QUIT ""
+2 ;
PRE12() ;ASAP 3.0: Name Suffix (Not Used)
+1 QUIT ""
+2 ;
PRE13() ;ASAP 3.0: Address Information - 1 (Not Used)
+1 QUIT ""
+2 ;
PRE14() ;ASAP 3.0: Address Information - 2 (Not Used)
+1 QUIT ""
+2 ;
PRE15() ;ASAP 3.0: City Address (Not Used)
+1 QUIT ""
+2 ;
PRE16() ;ASAP 3.0: State Address (Not Used)
+1 QUIT ""
+2 ;
PRE17() ;ASAP 3.0: Zip Code Address (Not Used)
+1 QUIT ""
+2 ;
PRE18() ;ASAP 3.0: Phone Number (Not Used)
+1 QUIT ""
+2 ;
PRE19() ;ASAP 3.0: Prescriber Specialty (Not Used)
+1 QUIT ""
+2 ;
PRE20() ;ASAP 3.0: Prescriber Fax Number (Not Used)
+1 QUIT ""
+2 ;
+3 ; *** CDI Segment - Compound Drug Ingredient Detail ***
CDI01() ;Compound Drug Ingredient Sequence Number (Not Used)
+1 QUIT ""
+2 ;
CDI02() ;Product ID Qualifier (Not Used)
+1 QUIT ""
+2 ;
CDI03() ;Product ID (Not Used)
+1 QUIT ""
+2 ;
CDI04() ;Component Ingredient Product Description (Not Used)
+1 QUIT ""
+2 ;
CDI05() ;Component Ingredient Quantity (Not Used)
+1 QUIT ""
+2 ;
CDI06() ;ASAP 3.0: Component Ingredient Cost (Not Used)
+1 QUIT ""
+2 ;
CDI07() ;ASAP 3.0: Component Ingredient Basis of Cost Determination (Not Used)
+1 QUIT ""
+2 ;
CDI08() ;ASAP 3.0: Compound Drug Dosage Units Code (Not Used)
+1 QUIT ""
+2 ;
+3 ; *** CSR Segment - Controlled Substance Reporting (ASAP 3.0 only) ***
CSR01() ;State Issuing Rx Serial Number (Not Used)
+1 QUIT ""
+2 ;
CSR02() ;State Issued Rx Serial Number (Not Used)
+1 QUIT ""
+2 ;
CSR03() ;ID Qualifier (Not Used)
+1 QUIT ""
+2 ;
CSR04() ;ID of Person Picking Up Rx (Not Used)
+1 QUIT ""
+2 ;
CSR05() ;Relationship of Person Picking Up Rx (Not Used)
+1 QUIT ""
+2 ;
CSR06() ;Last Name of Person Picking Up Rx (Not Used)
+1 QUIT ""
+2 ;
CSR07() ;First Name of Person Picking Up Rx (Not Used)
+1 QUIT ""
+2 ;
+3 ; *** AIR Segment - Additional Information Reporting (Not Used by ASAP 3.0) ***
AIR01() ;State Issuing Rx Serial Number (Not Used)
+1 QUIT ""
+2 ;
AIR02() ;State Issued Rx Serial Number (Not Used)
+1 QUIT ""
+2 ;
AIR03() ;Issuing Jurisdiction (Not Used)
+1 QUIT ""
+2 ;
AIR04() ;ID Qualifier of Person Dropping Off or Picking Up Rx (Not Used)
+1 QUIT ""
+2 ;
AIR05() ;ID of Person Dropping Off or Picking Up Rx (Not Used)
+1 QUIT ""
+2 ;
AIR06() ;Relationship of Person Dropping Off or Picking Up Rx (Not Used)
+1 QUIT ""
+2 ;
AIR07() ;Last Name of Person Dropping Off or Picking Up Rx (Not Used)
+1 QUIT ""
+2 ;
AIR08() ;First Name of Person Dropping Off or Picking Up Rx (Not Used)
+1 QUIT ""
+2 ;
AIR09() ;Last Name or Initials of Pharmacist (Not Used)
+1 QUIT ""
+2 ;
AIR10() ;First Name of Pharmacist (Not Used)
+1 QUIT ""
+2 ;
AIR11() ;ASAP 4.2: Dropping Off/Picking Up Identifier Qualifier
+1 QUIT ""
+2 ;
+3 ; *** RPH Segment - Pharmacist Information (ASAP 3.0 Only) ***
RPH01() ;Reporting Status (Not Used)
+1 QUIT ""
+2 ;
RPH02() ;Unique System ID (Not Used)
+1 QUIT ""
+2 ;
RPH03() ;National Provider Identification (NPI)
+1 QUIT $$RPH03^PSOASAP0()
+2 ;
RPH04() ;Pharmacist State License Number (Not Used)
+1 QUIT ""
+2 ;
RPH05() ;Pharmacist Alternate ID (Not Used)
+1 QUIT ""
+2 ;
RPH06() ;Pharmacist Last Name
+1 QUIT $$RPH06^PSOASAP0()
+2 ;
RPH07() ;Pharmacist First Name
+1 QUIT $$RPH07^PSOASAP0()
+2 ;
RPH08() ;Pharmacist Middle Name
+1 QUIT $$RPH08^PSOASAP0()
+2 ;
RPH09() ;Name Prefix (Not Used)
+1 QUIT ""
+2 ;
RPH10() ;Name Suffix (Not Used)
+1 QUIT ""
+2 ;
RPH11() ;Pharmacist Title (Not Used)
+1 QUIT ""
+2 ;
+3 ; *** PLN Segment - Third-Party Plan (ASAP 3.0 Only) ***
PLN01() ;Reporting Status (Not Used)
+1 QUIT ""
+2 ;
PLN02() ;Plan Coverage Status to Patient (Not Used)
+1 QUIT ""
+2 ;
PLN03() ;Unique System ID - Plan (Not Used)
+1 QUIT ""
+2 ;
PLN04() ;Classification Code for Plan Type (Not Used)
+1 QUIT ""
+2 ;
PLN05() ;Plan Name (Not Used)
+1 QUIT ""
+2 ;
PLN06() ;Processor BIN (Not Used)
+1 QUIT ""
+2 ;
PLN07() ;Processor Control Number (Not Used)
+1 QUIT ""
+2 ;
PLN08() ;Plan ID (Not Used)
+1 QUIT ""
+2 ;
PLN09() ;Group Number (Not Used)
+1 QUIT ""
+2 ;
PLN10() ;Cardholder ID (Not Used)
+1 QUIT ""
+2 ;
PLN11() ;Person Code (Not Used)
+1 QUIT ""
+2 ;
PLN12() ;Relationship Code (Not Used)
+1 QUIT ""
+2 ;
+3 ; *** TP Segment - Pharmacy Trailer ***
TP01() ;Detail Segment Count
+1 QUIT PSOTPCNT
+2 ;
+3 ; *** TT Segment - Transaction Set Trailer ***
TT01() ;Transaction Control Number
+1 ; ASAP 3.0 : Same as TH03
+2 ; ASAP 4.0+: Same as TH02
+3 QUIT $$TT01^PSOASAP0()
+4 ;
TT02() ;Segment Count
+1 QUIT $GET(PSOTTCNT)