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

IBDFN3.m

Go to the documentation of this file.
  1. IBDFN3 ;ALB/CJM - ENCOUNTER FORM - (entry points for reports);5/21/93
  1. ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
  1. RXPROF ;Outpatient Pharmacy Action Profile and Information Profile
  1. ;INPUTS:
  1. ;PSDAYS = number of days to print the medication profile for
  1. ;PSTYPE=1 for the Action Profile, =0 for the Information Profile
  1. ;DFN
  1. ;
  1. N IBDFN,ADDR,ADDRFL,CLASS,CNDT,DRUG,HDFL,I,II,J,L,LINE,P,PAGE,PSDOB,PSIIX,PSNAME,PSOI,PSSN,PSIX,PGM,PRF,PSDATE,VAL,VAR,RX,RX0,RX2,ST,ST0,PSDAY,RF,RFS
  1. N PSOPRINT,X1,X2,ZTSK,X,Y,PSII,PSDT,LMI,PSCNT,PSDIS,RXCNTLN,ELN,FN,CNT,VAERR,LN,PCLASS,PSOIFSUP,PSOINST,PSOSITE
  1. Q:(+$G(DFN)=0)
  1. S IBDFN=DFN
  1. S X1=DT,X2=-PSDAYS D C^%DTC S (PSDATE,PSDAY)=X
  1. S LINE=$TR($J(" ",IOM)," ","-")
  1. ;
  1. ; -- turn on barcoding for action profiles create parameter and check
  1. S PSOINST=$S($D(^DD("SITE",1)):$P(^(1),"^"),1:"000"),PSOPAR=1
  1. S PAGE=1 D HD^PSOSD2,PAT^PSOSD
  1. ;
  1. ; -- print OTHER MED INSTRUCTIONS and DUE's create parameter and check
  1. I PSTYPE,$L($T(RXPAD^PSOSD1)) D RXPAD^PSOSD1,ENSTUFF^PSODACT
  1. W:$Y @IOF
  1. ;
  1. S DFN=IBDFN
  1. K VA,VAEL,VAPA
  1. Q
  1. ;
  1. DRUGS ;prints the medication profile of Outpatient Pharmacy
  1. ;doesn't seem to be needed, integration agreement not obtained to use this
  1. ;INPUTS:
  1. ;PLS=0 for long, 1 for short
  1. ;PSRT="D" to sort by date, "M" to sort by medication, "C" to sort by class
  1. ;DFN
  1. ;
  1. ;N IBDFN,DRUG,ZII,PHYS,CT,AL,I1,REF,LMI,PI,FN,Y,I,J,RX,DRX,ST,RX0,RX2,DA,D0,DIC,DIPGM,II,K,ST0,TEMP,Z,LMI,RXD,RXF,PI,AL,D0,DIPGM,II,PSCNT,PSDIV,PSLC,PSDIS
  1. ;
  1. ;S (FN,IBDFN,D0,DA)=DFN
  1. ;I '$D(^PS(55,IBDFN,"P")),'$D(^("ARC")) D ^PSODEM W !?20,"NO PHARMACY INFORMATION" G RXQ
  1. ;I '$O(^PS(55,IBDFN,"P",0)),$D(^PS(55,IBDFN,"ARC")) D ^PSODEM W !!,"PATIENT HAS ARCHIVED PRESCRIPTIONS",! G RXQ
  1. ;D P^PSOP
  1. RXQ ;W @IOF
  1. ;S DFN=IBDFN
  1. ;K ^UTILITY($J)
  1. Q
  1. ROUTING ;entry point for printing a routing sheet for a single patient
  1. ;Sets IBPRINT=1 so that it will be known that this entry point was used
  1. ;inputs -
  1. ; DFN
  1. ; IBAPPT - the appointment
  1. ; IBCLINIC - pointer to the clinic
  1. ;protect variables that may be changed
  1. N %,%DT,%I,ADDR,ALL,APDATE,IBDFN,DGMT,DIC,DIV,G,GDATE,H,I,J,K,L,LL,M,NAME,NDATE,ORD,ORDER,P,POP,PRDATE
  1. N SC,SDA,SDATE,SDCNT,SDI,SDI1,SDIQ,SDM,SDREP,SDSP,SDSTART,SDVA,SDX,SDX1,SSN,SZ,TDO,X,X1,Y,ZIP,ZX,VAR,C,V,SDEF,A,SD,SCN,SDTD,SDSCCOND,SDPARMS
  1. ;
  1. ;protect DFN
  1. Q:(+$G(DFN)=0)
  1. S IBDFN=DFN N DFN S DFN=IBDFN
  1. ;
  1. ;set the start date to the date of the appt
  1. S SDPARMS("START")=IBAPPT\1
  1. ;keep the device open
  1. S SDPARMS("DO NOT CLOSE")=1
  1. ;set DIV to the division of IBCLINIC
  1. S DIV=$P($G(^SC(IBCLINIC,0)),"^",15)
  1. D EN1^SDROUT1
  1. Q