[613] | 1 | ORWRPP1 ; slc/dcm - Background Report Prints (cont.) ; 12/05/02 11:02
|
---|
| 2 | ;;3.0;ORDER ENTRY/RESULTS REPORTING;**109,160,192**;Dec 17, 1997
|
---|
| 3 | MEDB(ROOT,ORDFN,OREXAMID,ORALPHA,OROMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ;Print Medicine report
|
---|
| 4 | K ^TMP("MCAR",$J)
|
---|
| 5 | I '$D(^MCAR(690,"AC",ORDFN)) Q
|
---|
| 6 | N ORHFS,%,%I,DA,DILCT,DISTP,S1,S2,S4,S6,TY,WH
|
---|
| 7 | S ORHFS=1
|
---|
| 8 | D EN^MCARPS2(ORDFN)
|
---|
| 9 | D MEDB^ORWRP1(.ROOT,.ORDFN,.OREXAMID,.ORALPHA,.OROMEGA,.ORDTRNG,.REMOTE,.ORMAX,.ORFHIE)
|
---|
| 10 | K ^TMP("MCAR",$J)
|
---|
| 11 | Q
|
---|
| 12 | HSB(ROOT,ORDFN,ORHSTYPE,ORALPHA,OROMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ;Print Health Summary report
|
---|
| 13 | IF $O(ORCOMP(0)) D SITE^ORWRPP($G(STATION)),PREPORT^ORWRP2(.ROOT,.ORCOMP,.ORDFN) Q
|
---|
| 14 | D SITE^ORWRPP($G(STATION)),HSB^ORWRP1(.ROOT,.ORDFN,.ORHSTYPE,.ORALPHA,.OROMEGA,.ORDTRNG,.REMOTE,.ORMAX,.ORFHIE)
|
---|
| 15 | Q
|
---|
| 16 | HSTYPEB(ROOT,ORDFN,ORHSTYPE,ORALPHA,OROMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ;Print Health Summary type report
|
---|
| 17 | D HSTYPEB^ORWRP1(.ROOT,.ORDFN,$P(ORHSTYPE,";",3),.ORALPHA,.OROMEGA,.ORDTRNG,.REMOTE,.ORMAX,.ORFHIE)
|
---|
| 18 | Q
|
---|
| 19 | LSB(ROOT,ORDFN,ORHSTYPE,ORALPHA,OROMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ;Print Lab Status Report
|
---|
| 20 | N ORY,PAGE,ORVP,TEXT
|
---|
| 21 | S ORVP=ORDFN_";DPT("
|
---|
| 22 | D EN1^LR7OSOS1(.ORY,ORVP,.ORALPHA,.OROMEGA,.ORDTRNG)
|
---|
| 23 | Q:'$L(ORY)
|
---|
| 24 | S PAGE=1,TEXT="PATIENT LAB ORDER STATUS REPORT ("_$$FMTE^XLFDT(ORALPHA)_" - "_$$FMTE^XLFDT(OROMEGA)_")"
|
---|
| 25 | D HEAD(ORDFN,PAGE,TEXT)
|
---|
| 26 | D HURL(.ORY,ORDFN,TEXT)
|
---|
| 27 | Q
|
---|
| 28 | BCMA2B(ROOT,ORDFN,OREXAMID,ORALPHA,OROMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ;Print BCMA Med Hist
|
---|
| 29 | N ORY,PAGE,TEXT
|
---|
| 30 | D
|
---|
| 31 | . N IO
|
---|
| 32 | . D BCMA2^ORWRP1A(.ORY,.ORDFN,.OREXAMID,.ORALPHA,.OROMEGA,.ORDTRNG,.REMOTE,.ORMAX,.ORFHIE)
|
---|
| 33 | U IO
|
---|
| 34 | Q:'$L(ORY)
|
---|
| 35 | S PAGE=1,TEXT="PATIENT BCMA MEDICATION HISTORY BCMA ("_$$FMTE^XLFDT(ORALPHA)_" - "_$$FMTE^XLFDT(OROMEGA)_")"
|
---|
| 36 | D HEAD(ORDFN,PAGE,TEXT,$G(STATION))
|
---|
| 37 | D HURL(.ORY,ORDFN,TEXT,1)
|
---|
| 38 | I $L($G(ORY)) K @ORY
|
---|
| 39 | Q
|
---|
| 40 | BCMA1B(ROOT,ORDFN,OREXAMID,ORALPHA,OROMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ;Print BCMA Med Log
|
---|
| 41 | N ORY,PAGE,TEXT
|
---|
| 42 | D
|
---|
| 43 | . N IO
|
---|
| 44 | . D BCMA1^ORWRP1A(.ORY,.ORDFN,.OREXAMID,.ORALPHA,.OROMEGA,.ORDTRNG,.REMOTE,.ORMAX,.ORFHIE)
|
---|
| 45 | U IO
|
---|
| 46 | Q:'$L(ORY)
|
---|
| 47 | S PAGE=1,TEXT="PATIENT MEDICATION LOG BCMA ("_$$FMTE^XLFDT(ORALPHA)_" - "_$$FMTE^XLFDT(OROMEGA)_")"
|
---|
| 48 | D HEAD(ORDFN,PAGE,TEXT,$G(STATION))
|
---|
| 49 | D HURL(.ORY,ORDFN,TEXT,1)
|
---|
| 50 | I $L($G(ORY)) K @ORY
|
---|
| 51 | Q
|
---|
| 52 | PROBB(ROOT,ORDFN,OREXAMID,ORALPHA,OROMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ;Print Problem List (Problem Tab)
|
---|
| 53 | D SITE^ORWRPP($G(STATION)),PROBB^ORWRP1(.ORY,.ORDFN,.ID,.ORALPHA,.OROMEGA,.ORDTRNG,.REMOTE,.ORMAX,.ORFHIE)
|
---|
| 54 | Q
|
---|
| 55 | GETVTYPE ;Print V Type reports
|
---|
| 56 | S PAGE=1,ORY="ORRPT"
|
---|
| 57 | D HEAD(ORDFN,PAGE,ORHEAD,$G(STATION))
|
---|
| 58 | D HURL(.ORY,ORDFN,ORHEAD,1)
|
---|
| 59 | Q
|
---|
| 60 | PRINTV(ORY,ORIO,ORDFN,ORHEAD,ORRPT) ;Print data for remote sites
|
---|
| 61 | ; RPC: ORWRP PRINT V REPORT
|
---|
| 62 | N ZTDTH,ZTRTN,ZTSK,ZTDESC,ZTSAVE,I,ORHSTAG
|
---|
| 63 | ;S ORHSTAG=$P($G(ORRPTID),"~",2),ORRPTID=$P($G(ORRPTID),"~"),ORRPTID=$P($P(ORRPTID,";"),":")
|
---|
| 64 | S ZTIO=ORIO,ZTDTH=$H
|
---|
| 65 | S ZTDESC="Remote V Report Print"
|
---|
| 66 | S ZTRTN="GETVTYPE^ORWRPP1"
|
---|
| 67 | F I="ORDFN","ORHEAD","ORRPT(" S ZTSAVE(I)=""
|
---|
| 68 | D ^%ZTLOAD
|
---|
| 69 | I $D(ZTSK) D
|
---|
| 70 | . S ORY="0^Report queued. (Task #"_ZTSK_")"
|
---|
| 71 | E D
|
---|
| 72 | . S ORY="99^Task Rejected."
|
---|
| 73 | Q
|
---|
| 74 | HEAD(ORDFN,PAGE,TITLE,STATION) ;Print a patient header
|
---|
| 75 | Q:'$G(ORDFN)
|
---|
| 76 | N %,%H,%I,DISYS,ORAGE,ORDOB,ORHLINE,ORL,ORNP,ORPNM,ORPV,ORSEX,ORSSN,ORTS,ORWARD,VA,X,ORI
|
---|
| 77 | S:'$L($G(TITLE)) TITLE="PATIENT REPORT"
|
---|
| 78 | D PAT^ORPR03(ORDFN)
|
---|
| 79 | D SITE^ORWRPP($G(STATION))
|
---|
| 80 | W !,TITLE,?(IOM-$L("Page "_PAGE)),"Page "_PAGE
|
---|
| 81 | S X=ORDOB_" ("_ORAGE_")"
|
---|
| 82 | W !,ORPNM_" "_ORSSN,?39,$G(ORL(0))_$S($L($G(ORL(1))):"/"_ORL(1),1:""),?(79-$L(X)),X
|
---|
| 83 | S $P(ORHLINE,"=",IOM+1)=""
|
---|
| 84 | W !,ORHLINE
|
---|
| 85 | S X="Printed: "_$$DATE^ORU($$NOW^XLFDT,"MM/DD/CCYY HR:MIN")
|
---|
| 86 | W !?27,"*** WORK COPY ONLY ***",?(IOM-($L(X))-1),X
|
---|
| 87 | Q
|
---|
| 88 | HURL(Y,ORDFN,TITLE,FORMAT,STATION,READ) ;Write out the file
|
---|
| 89 | ;FORMAT tells me which node to go after
|
---|
| 90 | N L,NOHURL,A,OUT
|
---|
| 91 | S OUT=0,L="",NOHURL=0
|
---|
| 92 | F S L=$O(@Y@(L)) Q:L="" Q:OUT D
|
---|
| 93 | . I $Y+4>IOSL D
|
---|
| 94 | .. S PAGE=PAGE+1
|
---|
| 95 | .. W !?27,"*** WORK COPY ONLY *** (continued...)"
|
---|
| 96 | .. I $G(READ),$G(IOT)'["HFS" R !,"^ TO STOP: ",A:DTIME I A["^" S OUT=1 Q
|
---|
| 97 | .. W @IOF
|
---|
| 98 | .. I $G(IOT)["HFS" S $Y=0
|
---|
| 99 | .. D HEAD(ORDFN,PAGE,$G(TITLE),$G(STATION))
|
---|
| 100 | .. W !,"(...continued)"
|
---|
| 101 | . I $G(FORMAT) D Q
|
---|
| 102 | .. Q:'$D(@Y@(L))
|
---|
| 103 | .. I NOHURL,$P(@Y@(L),"^")'="[REPORT TEXT]" Q
|
---|
| 104 | .. I NOHURL,$P(@Y@(L),"^")="[REPORT TEXT]" S NOHURL=0 Q
|
---|
| 105 | .. I $P(@Y@(L),"^")="[HIDDEN TEXT]" S NOHURL=1 Q
|
---|
| 106 | .. I @Y@(L)["**PAGE BREAK**" Q
|
---|
| 107 | .. W !,@Y@(L)
|
---|
| 108 | . Q:'$D(@Y@(L,0))
|
---|
| 109 | . I NOHURL,$P(@Y@(L,0),"^")'="[REPORT TEXT]" Q
|
---|
| 110 | . I NOHURL,$P(@Y@(L,0),"^")="[REPORT TEXT]" S NOHURL=0 Q
|
---|
| 111 | . I $P(@Y@(L,0),"^")="[HIDDEN TEXT]" S NOHURL=1 Q
|
---|
| 112 | . I @Y@(L,0)["**PAGE BREAK**" Q
|
---|
| 113 | . W !,@Y@(L,0)
|
---|
| 114 | W !?27,"*** WORK COPY ONLY ***"
|
---|
| 115 | Q
|
---|