Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PSS50

PSS50.m

Go to the documentation of this file.
  1. PSS50 ;BIR/LDT - API FOR INFORMATION FROM FILE 50 ;5 Sep 03
  1. ;;1.0;PHARMACY DATA MANAGEMENT;**85,104,192**;9/30/97;Build 25
  1. ;
  1. DATA(PSSIEN,PSSFT,PSSFL,PSSPK,PSSRTOI,LIST) ;
  1. ;Returns Drug File (#50) Data
  1. D DATA^PSS50DAT
  1. Q
  1. CMOP(PSSIEN,PSSFT,PSSFL,PSSPK,PSSRTOI,LIST) ;
  1. ;Returns CMOP information from Drug File (#50)
  1. D CMOP^PSS50CMP
  1. Q
  1. DRG(PSSIEN,PSSFT,PSSFL,PSSPK,PSSRTOI,LIST) ;
  1. ;Returns information from Drug File (#50) used by Inpatient Meds/Unit Dose
  1. D DRG^PSS50DAT
  1. Q
  1. ATC(PSSIEN,PSSFT,PSSFL,PSSPK,LIST) ;
  1. ;Returns ATC fields from the Drug File (#50)
  1. N PSSRTOI
  1. D ATC^PSS50ATC
  1. Q
  1. INV(PSSIEN,PSSFT,PSSFL,PSSPK,PSSRTOI,LIST) ;
  1. ;Returns inventory fields from the Drug File (#50)
  1. D INV^PSS50B
  1. Q
  1. NDF(PSSIEN,PSSFT,PSSFL,PSSPK,PSSRTOI,LIST) ;
  1. ;Returns NDF fields from the Drug File (#50)
  1. D NDF^PSS50B
  1. Q
  1. LAB(PSSIEN,PSSFT,PSSFL,PSSPK,PSSRTOI,LIST) ;
  1. ;Returns Lab information from the Drug File (#50)
  1. D LAB^PSS50LAB
  1. Q
  1. CLOZ(PSSIEN,PSSFT,PSSFL,PSSPK,PSSRTOI,LIST) ;
  1. ;Returns Clozapine information from the Drug File (#50)
  1. D CLOZ^PSS50B2
  1. Q
  1. ARWS(PSSIEN,PSSFT,LIST) ;
  1. ;Returns fields utilized by the Automatic Replenishment/Ward Stock extract in PBM
  1. N PSSFL,PSSPK,PSSRTOI
  1. D ARWS^PSS50WS
  1. Q
  1. DOSE(PSSIEN,PSSFT,PSSFL,PSSPK,PSSRTOI,LIST) ;
  1. ;Returns Dosing fields from the Drug File (#50)
  1. D DOSE^PSS50B
  1. Q
  1. WS(PSSIEN,PSSFT,PSSFL,PSSPK,PSSRTOI,LIST) ;
  1. ;Returns Ward Stock fields from the Drug File (#50)
  1. D WS^PSS50C
  1. Q
  1. MRTN(PSSIEN,PSSFT,PSSFL,PSSPK,PSSRTOI,LIST) ;
  1. ;Returns Lab Test Monitor fields from the Drug File (#50)
  1. D MRTN^PSS50C
  1. Q
  1. ZERO(PSSIEN,PSSFT,PSSFL,PSSPK,PSSRTOI,LIST) ;
  1. ;Returns Zero node information from the Drug File (#50)
  1. D ZERO^PSS50C
  1. Q
  1. NOCMOP(PSSIEN,PSSFL) ;
  1. ;Returns drugs from the Drug file (#50) with the CMOP Dispense Field set to Null or No
  1. Q $$NOCMOP^PSS50C(PSSIEN,$S($G(PSSFL)]"":PSSFL,1:""))
  1. Q
  1. MSG(LIST) ;
  1. ;Returns entries and data from the Drug File (#50) with data in the Quantity Dispense Message field
  1. D MSG^PSS50C
  1. Q
  1. IEN(LIST) ;
  1. ;Returns Active Outpatient Drugs with a VA Product Name entry
  1. D IEN^PSS50C
  1. Q
  1. B(PSSFT,PSSFL,PSSPK,PSSRTOI,LIST) ;
  1. ;Returns Drug information based on B cross reference
  1. D B^PSS50D
  1. Q
  1. VAC(PSSVAL,PSSFL,PSSPK,LIST) ;
  1. ;Returns Generic Name based on National Drug Class
  1. N PSSRTOI
  1. D VAC^PSS50D
  1. Q
  1. NDC(PSSVAL,PSSFL,PSSPK,LIST) ;
  1. ;Returns Generic Name or IEN for drugs when passed an NDC
  1. D NDC^PSS50D
  1. Q
  1. ASP(PSSVAL,PSSFL,PSSPK,LIST) ;
  1. ;Returns drug entries when passed an Orderable Item
  1. N PSSRTOI
  1. D ASP^PSS50D
  1. Q
  1. AND(PSSVAL,PSSFL,PSSPK,LIST) ;
  1. ;Returns drug entries when passed a National Drug File entry
  1. N PSSRTOI
  1. D AND^PSS50D
  1. Q
  1. AP(PSSVAL,PSSFL,PSSPK,LIST) ;
  1. ;Returns drug entries when passed a Primary Drug entry
  1. N PSSRTOI
  1. D AP^PSS50D
  1. Q
  1. DSPUNT(PSSIEN,PSSIEN2,LIST) ;
  1. ;Returns Dispense Units Per Order Unit when passed in the Drug and Synonym
  1. D DSPUNT^PSS50C1
  1. Q
  1. SKB(PSSIEN,PSSFL) ;
  1. ;Sets and kills B cross reference on the Name field when the Drug is passed
  1. I +$G(PSSIEN)'>0 Q 0
  1. I $G(PSSFL)']"" Q 0
  1. I "SK"'[$G(PSSFL) Q 0
  1. Q $$SKB^PSS50E(PSSIEN,PSSFL)
  1. AOC(PSSVAL,PSSFL,PSSPK,LIST) ;
  1. ;Returns generic name or IEN for drugs when passed the VA CLASSIFICATION
  1. D AOC^PSS50E
  1. Q
  1. C(PSSVAL,PSSFL,PSSPK,LIST) ;
  1. ;Returns information from the Synonym multiple of the Drug File (#50)
  1. D C^PSS50E
  1. Q
  1. AQ(PSSIEN) ;
  1. ;Checks for existence of "AQ" x-ref for PSSIEN passed
  1. I +$G(PSSIEN)'>0 Q 0
  1. Q +$G(^PSDRUG(+PSSIEN,3))
  1. SKAQ(PSSIEN,PSSFL) ;
  1. ;Sets and kills "AQ" x-ref on the CMOP Dispense field for PSSIEN passed
  1. I +$G(PSSIEN)'>0 Q 0
  1. I $G(PSSFL)']"" Q 0
  1. I "SK"'[$G(PSSFL) Q 0
  1. Q $$SKAQ^PSS50E(PSSIEN,$G(PSSFL))
  1. SKAQ1(PSSIEN) ;
  1. ;Sets and kills "AQ1" x-ref on the CMOP ID field for PSSIEN passed
  1. I +$G(PSSIEN)'>0 Q 0
  1. Q $$SKAQ1^PSS50E(PSSIEN)
  1. AQ1(PSSVAL,PSSFL,PSSPK,LIST) ;
  1. ;Returns a list of drugs associated with the CMOP ID passed
  1. D AQ1^PSS50B1
  1. Q
  1. A526(PSSIEN,LIST) ;
  1. ;Returns a list of additives associated with the Drug passed
  1. D A526^PSS50E
  1. Q
  1. A527(PSSIEN,LIST) ;
  1. ;Returns a list of solutions associated with the drug passed
  1. D A527^PSS50E
  1. Q
  1. AIU(PSSFT,PSSPK,PSSFL,LIST) ;
  1. ;Returns a list of drugs based on Application Packages' Use and Inactive Date
  1. D AIU^PSS50B1
  1. Q
  1. IU(PSSFL,LIST) ;
  1. ;Returns a list of drugs based on Application Packages' Use not containing "O", "U", "I", or "N"
  1. D IU^PSS50B1
  1. Q
  1. SKAIU(PSSIEN,PSSFL) ;
  1. ;Sets and Kills the "AIU" x-ref on the APPLICATION PACKAGES' USE field for PSSIEN and PSSPK passed
  1. I +$G(PSSIEN)'>0 Q 0
  1. I $G(PSSFL)']"" Q 0
  1. I "SK"'[$G(PSSFL) Q 0
  1. Q $$SKAIU^PSS50E(PSSIEN,PSSFL)
  1. SKIU(PSSIEN) ;
  1. ;Sets and Kills the "IU" x-ref on the APPLICATION PACKAGES' USE field for PSSIEN and PSSPK passed
  1. I +$G(PSSIEN)'>0 Q 0
  1. Q $$SKIU^PSS50E(PSSIEN)
  1. AB(PSSVAL,PSSFL,PSSPK,LIST) ;
  1. ;Returns a list of drugs associated with an IFCAP Item Number
  1. D AB^PSS50C
  1. Q
  1. AVSN(PSSVAL,PSSFL,PSSPK,LIST) ;
  1. ;Returns synonym multiple for Synonym value passed
  1. D AVSN^PSS50B1
  1. Q
  1. FRMALT(PSSIEN,PSSFT,PSSFL,PSSPK,LIST) ;
  1. ;Returns the Formulary Altenative for the drug value passed
  1. N PSSRTOI
  1. D FRMALT^PSS50B2
  1. Q
  1. LABEL(PSSIEN,LIST) ;
  1. ;Returns Information for the scanner for the drug IEN passed
  1. D LABEL^PSS50A1
  1. Q
  1. SORT(PSSIEN,LIST) ;
  1. ;Returns a list of drugs for the IEN passed
  1. D SORT^PSS50A1
  1. Q
  1. OLDNM(PSSIEN,PSSFT,PSSFL,PSSPK,LIST) ;
  1. ;Returns OLD NAME multiple from the Drug File (#50)
  1. N PSSRTOI
  1. D OLDNM^PSS50F
  1. Q
  1. ADDOLDNM(PSSIEN,PSSONM,PSSDT) ;
  1. ;Adds an entry to the OLD NAME Multiple of the Drug file (#50)
  1. Q $$ADDOLDNM^PSS50F($G(PSSIEN),$G(PSSONM),$G(PSSDT))
  1. LIST(PSSFT,PSSFL,PSSD,PSSPK,LIST) ;
  1. ;Returns a list containing GENERIC NAME field (#.01) and PHARMCY ORDERABLE ITEM field (#2.1)
  1. N PSSRTOI
  1. D LIST^PSS50F1
  1. Q
  1. EDTIFCAP(PSSIEN,PSSVAL) ;
  1. ;Adds an entry to the IFCAP ITEM NUMBER multiple of the DRUG file (#50)
  1. Q $$EDTIFCAP^PSS50F($G(PSSIEN),$G(PSSVAL))
  1. LOOKUP(PSSFT,PSSFL,PSSPK,PSSRTOI,PSSIFCAP,PSSCMOP,PSSD,LIST) ;
  1. D LOOKUP^PSS50F1
  1. Q
  1. CSYN(PSSIEN,PSSVAL,LIST) ;
  1. ;returns synonym information from the synonym multiple of the Drug file (#50)
  1. D CSYN^PSS50C1
  1. Q
  1. PSSBILSD(PSSIEN,EPHBILSD) ;
  1. ; returns eBillable & Sensitive Diagnosis Drug fields from the Drug File(#50)
  1. ; Input:PSSIEN - File #50 Drug IEN
  1. ; Output:Drug File billable and sensitive diagnosis drug fields
  1. ; EPHBILL - EPHARMACY BILLABLE field #84
  1. ; EPHTRI - EPHARMACY BILLABLE (TRICARE) field #85
  1. ; EPHCHAMP - EPHARMACY BILLABLE (CHAMPVA) field #86
  1. ; EPHSENS - EPHARMACY SENSITIVE DIAGNOSIS DRUG field #87
  1. ;
  1. ; EPHBILSD=EPHBILL^EPHTRI^EPHCHAMP^EPHSENS
  1. ;
  1. N EPHNODE,EPHBILL,EPHTRI,EPHCHAMP,EPHSENS,EPHBILSD
  1. I $G(PSSIEN)="" Q 0
  1. S EPHNODE=$G(^PSDRUG(PSSIEN,"EPH"))
  1. S EPHBILL=$P(EPHNODE,U,4)
  1. S EPHTRI=$P(EPHNODE,U,5)
  1. S EPHCHAMP=$P(EPHNODE,U,6)
  1. S EPHSENS=$P(EPHNODE,U,7)
  1. S EPHBILSD=EPHBILL_U_EPHTRI_U_EPHCHAMP_U_EPHSENS
  1. Q EPHBILSD