source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORRECP.m@ 1476

Last change on this file since 1476 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.6 KB
RevLine 
[613]1ORRECP ; BSL - VOE RECORD PRINT UTILITY; 11/02/06 [11/02/06 01:43am]
2 ;;1.0;ORDER ENTRY/RESULTS REPORTING;****;Nov 02, 2006;Build 1
3 ;Two primary tags one for all of today's data (TODAY) and one for date range (HIST)
4 ;
5ALLCALL(OROOT,ORDFN,ID,ALPHA,OMEGA,DTRANGE,REMOTE,ORMAX,ORFHIE) ; call all the record data procedure calls and wrap them into a single large report
6 ;We must have all the same return parameters and must concatenate them all so
7 ;we have a single continious report. Store the previous return parameter into a temp variable
8 ;then combine when the called routine returns.
9 ;
10 N ORAM,ORY,ORTMP,ORLST,ORVISIT,ORDCS,ORTIUY,ORREF,ORRET,ORNXT,ORALID,ORCRDET,ORPRBID,ORPDET,ORPROB,ORVIT,ORGRPS,I
11 N ORCNTXT,OREDT,OREVT,ORUSER,FILTER,SKIP
12 I $G(U)="" S U="^"
13 Q:'$G(ORDFN)
14 I $L($G(DTRANGE)),'$G(ALPHA) S ALPHA=$$FMADD^XLFDT(DT,-DTRANGE),OMEGA=$$NOW^XLFDT
15 Q:'$G(ALPHA) Q:'$G(OMEGA)
16 Q:$G(ORDFN)=""!('$D(^DPT(ORDFN)))
17 I $G(OROOT)="" S OROOT=""
18 S ORAM=""
19 D ACTIVE^ORWPS(.ORAM,ORDFN) ;ACTIVE MEDICATIONS
20 M ORTMP("ACTIVE")=ORAM
21 K ORY S ORY=""
22 ;S TO=$S($G(ALPHA)'="":ALPHA,1:"")
23 ;S FROM=$S($G(OMEGA)'="":OMEGA,1:"")
24 D INTERIM^ORWLRR(.ORY,ORDFN,OMEGA,ALPHA) ;LABS
25 M ORTMP("LABS")=ORY
26 S ORVIT=""
27 ;S ORSDT=$S($G(ALPHA)'="":ALPHA,1:"")
28 ;S OREDT=$S($G(OMEGA)'="":OMEGA,1:"")
29 D VITALS^ORWRP1(.ORVIT,ORDFN,"",ALPHA,OMEGA,"") ;VITALS
30 M ORTMP("VITALS")=@ORVIT
31 S ORTMP("IMMUN")="" ; IMMUNIZATIONS ARE RETRIEVED IN THE PRINT SECTION.
32 S (ORPROB,ORCNTXT)=""
33 D PROBL^ORQQPL3(.ORPROB,ORDFN,ORCNTXT) ;PROBLEMS
34 M ORTMP("PROB")=ORPROB
35 K ORAY S ORAY=""
36 D LIST^ORQQAL(.ORAY,ORDFN) ;ALLERGIES
37 M ORTMP("ALLERGIES")=ORAY
38 K ORLST S ORLST=""
39 D LIST^ORQQPXRM(.ORLST,ORDFN,"")
40 M ORTMP("CR")=ORLST
41 S ORVISIT="",SKIP=0
42 ;S BEG=$S($G(OMEGA)'="":OMEGA,1:"")
43 ;S END=$S($G(ALPHA)'="":ALPHA,1:"")
44 D VST1^ORWCV(.ORVISIT,ORDFN,ALPHA,OMEGA,SKIP) ;VISITS
45 M ORTMP("VISITS")=ORVISIT
46 S (ORREF,OREVT,ORGRPS)="",FILTER=1
47 ;S DTFROM=$S($G(ALPHA)'="":ALPHA,1:"")
48 ;S DTTHRU=$S($G(OMEGA)'="":OMEGA,1:"")
49 D AGET^ORWORR(.ORREF,ORDFN,"2^0",ORGRPS,ALPHA,OMEGA,OREVT) ;ORDERS
50 M ORTMP("ORDERS")=^TMP("ORR",$J)
51 S ORDCS="",ORUSER=DUZ
52 D GTDCCTX^ORWTIU(.ORDCS,ORUSER) ;DISCHARGE SUMMARIES
53 M ORTMP("DC")=ORDCS
54 ;The notes section is a two step process where the notes list is acquired and then the content of each note
55 ;in the list is concatenated to the
56 S ORTIUY=""
57 ;EJK CLASS IS A POINTER TO FILE 8925.1, SO THIS IEN NEEDS TO BE DETERMINED.
58 D CONTEXT^TIUSRVLO(.ORTIUY,3,1,ORDFN,-1,-1,0,100,"D",1) ;GET LIST OF NOTES
59 S I=0
60 S ORTMP("NOTES")=""
61 F S I=$O(^TMP("TIUR",$J,I)) Q:I="" S ORTMP("NOTES",I)=$P($G(^TMP("TIUR",$J,I)),U,1)
62 ;
63 D PRINT^ORRECP1
64 Q
Note: See TracBrowser for help on using the repository browser.