ORQQPXRM ;SLC/PJH - Functions for reminder data ;08/17/2018
;;3.0;ORDER ENTRY/RESULTS REPORTING;**10,85,116,173,187,190,215,243,306,389,377,405**;Dec 17, 1997;Build 211
;
;ORQQPXRM DIALOG ACTIVE
ACTIVE(ORY,ORLIST) D ACTIVE^PXRMRPCC(.ORY,.ORLIST) Q ; DBIA 3080
;
;ORQQPXRM REMINDER EVALUATION
ALIST(ORY,ORPT,ORLIST) D ALIST^PXRMRPCA(.ORY,.ORPT,.ORLIST) Q ; DBIA 3078
;
;ORQQPXRM REMINDERS APPLICABLE
APPL(ORY,ORPT,ORLOC) D EVALCOVR^ORQQPX(.ORY,ORPT,ORLOC) Q
;
;ORQQPXRM REMINDER CATEGORIES
CATEGORY(ORY,ORPT,ORLOC) ;
D CATEGORY^PXRMRPCA(.ORY,ORPT,ORLOC) Q ; DBIA 3078
;
;ORQQPXRM REMINDER DIALOG
DIALOG(ORY,ORREM,DFN,VISITID) D DIALOG^PXRMRPCC(.ORY,ORREM,DFN,VISITID) Q ; DBIA 3080
;
;ORQQPXRM EDUCATION SUBTOPICS
EDS(ORY,OREDU) D EDS^PXRMRPCB(.ORY,OREDU) Q ; DBIA 3079
;
;ORQQPXRM EDUCATION SUMMARY
EDL(ORY,OREM) D EDL^PXRMRPCB(.ORY,OREM) Q ; DBIA 3079
;
;ORQQPXRM EDUCATION TOPIC
EDU(ORY,OREDU) D EDU^PXRMRPCB(.ORY,OREDU) Q ; DBIA 3079
;
;ORQQPXRM PROGRESS NOTE HEADER
HDR(ORY,ORLOC) D HDR^PXRMRPCC(.ORY,ORLOC) Q ; DBIA 3080
;
;ORQQPXRM REMINDERS UNEVALUATED
LIST(ORY,ORPT,ORLOC) D GETLIST^ORQQPX(.ORY,ORLOC) Q
;
;ORQQPXRM MENTAL HEALTH
MH(ORY,OTEST) ;
D MH^PXRMRPCC(.ORY,OTEST) ; DBIA 3080
S ORY(0)=0
I $$PATCH^XPDUTL("YS*5.01*85") S ORY(0)=1
Q
;
MHDLL(ORY,DFN,INPUTS,DIEN) ;
N CNT,CNT1,ORRESULT,ORSCORES,TEXT
F TEXT="RESULTS","SCORES" D
.S CNT=0,CNT1=0
.F S CNT=$O(INPUTS(TEXT,CNT)) Q:CNT="" D
..S CNT1=CNT1+1
..I TEXT="RESULTS" S ORRESULT(CNT1)=$G(INPUTS(TEXT,CNT))
..I TEXT="SCORES" S ORSCORES(CNT1)=$G(INPUTS(TEXT,CNT))
D MHDLL^PXRMDRSG(.ORY,.ORRESULT,.ORSCORES,DFN,DIEN)
Q
;
;ORQQPXRM MENTAL HEALTH RESULTS
MHR(ORY,RESULT,ORES) ;
; DBIA 3080
D MHR^PXRMRPCC(.ORY,RESULT,.ORES)
Q
;
;ORQQPXRM MENTAL HEALTH SAVE
MHS(ORY,ORES) D MHS^PXRMRPCC(.ORY,.ORES) Q ; DBIA 3080
;
MHV(ORY,DFN,NAME,ANS) ;
N ORDATA,ORES,X
S ORY(0)=0
I '$$PATCH^XPDUTL("YS*5.01*85") S ORY(0)=2 Q
I '$L(ANS) Q
S ORES("DFN")=DFN,ORES("CODE")=NAME
F X=1:1:$L(ANS) I $E(ANS,X)'="X" D
.;I $E(ANS,X)="T" S $E(ANS,X)=1
.;I $E(ANS,X)="F" S $E(ANS,X)=2
.S ORES(X)=X_U_$E(ANS,X)
D CHECKCR^YTQPXRM4(.ORDATA,.ORES)
I $G(ORDATA(2))="OK" S ORY(0)=1 Q
S ORY(1)=$P($G(ORDATA(2)),U,2)
Q
;
;ORQQPXRM MST UPDATE
MST(ORY,ORPT,ORDATE,ORSTAT,ORPROV,ORFTYP,ORFIEN,ORRES) ;
D MST^PXRMRPCC(.ORY,ORPT,ORDATE,ORSTAT,ORPROV,ORFTYP,ORFIEN,ORRES) Q
;
;ORQQPXRM WOMEN HEALTH RESULT
WH(ORY,ORRESULT) ;
D WH^PXRMRPCC(.ORY,.ORRESULT) Q
;
WHLETTER(ORY,ORIEN) ;
D LETTER^WVRPCNO1(.ORY,ORIEN) Q
;
WHREPORT(ORY,ORIEN) ;
D RESULTS^WVALERTF(.ORY,ORIEN) Q
;
;ORQQPXRM DIALOG PROMPTS
PROMPT(ORY,ORDLG,ORDCUR,ORFTYP,ORIEN,NDATA) ;
D PROMPT^PXRMRPCC(.ORY,ORDLG,ORDCUR,ORFTYP,ORIEN,.NDATA) Q ; DBIA 3080
;
;ORQQPXRM REMINDER DETAIL
REMDET(ORY,ORPT,ORIEN) D REMDET^PXRMRPCA(.ORY,ORPT,ORIEN) Q ; DBIA 3078
;
;ORQQPXRM REMINDER INQUIRY
RES(ORY,ORREM) D RES^PXRMRPCC(.ORY,ORREM) Q ; DBIA 3080
;
;ORQQPXRM REMINDER WEB
WEB(ORY,ORREM) D WEB^PXRMRPCA(.ORY,ORREM) Q ; DBIA 3078
;
;PXRM REMINDER DIALOG (TIU)
TDIALOG(ORY,ORDLG,DFN,VISITID) D DIALOG^PXRMRPCD(.ORY,ORDLG,DFN,VISITID) Q
;
ACT(REM) ;ORQQPX SEARCH ITEMS - XPAR value screen for active reminders
;Treat a null value as inactive
I 'REM Q 0
;Check IF inactive flag is set
I ($T(INACTIVE^PXRM)'=""),$$INACTIVE^PXRM(REM) Q 0 ; DBIA 2182
;Otherwise active
Q 1
;
REMVER(ORLIST) ;
S ORLIST=$$VERSION^XPDUTL("PXRM")
Q
;
GEC(ORRESULT,IEN,DFN,VISIT,NOTEIEN) ;
D API^PXRMGECU(.ORRESULT,IEN,DFN,VISIT,1,NOTEIEN)
Q
;
GECF(RESULT,DFN,FIN) ;
D FINISHED^PXRMGECU(DFN,FIN)
Q
;
GECP(RESULT,DFN) ;
S RESULT=$$STATUS^PXRMGECU(DFN)
Q
;
;ORQQPXRM REMINDER LINK SEQ
AFFSEQ(RESULT,LINK) D GETLSEQ^PXRMDLLB(.RESULT,+$G(LINK)) Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORQQPXRM 3836 printed Oct 16, 2024@18:34:21 Page 2
ORQQPXRM ;SLC/PJH - Functions for reminder data ;08/17/2018
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**10,85,116,173,187,190,215,243,306,389,377,405**;Dec 17, 1997;Build 211
+2 ;
+3 ;ORQQPXRM DIALOG ACTIVE
ACTIVE(ORY,ORLIST) ; DBIA 3080
DO ACTIVE^PXRMRPCC(.ORY,.ORLIST)
QUIT
+1 ;
+2 ;ORQQPXRM REMINDER EVALUATION
ALIST(ORY,ORPT,ORLIST) ; DBIA 3078
DO ALIST^PXRMRPCA(.ORY,.ORPT,.ORLIST)
QUIT
+1 ;
+2 ;ORQQPXRM REMINDERS APPLICABLE
APPL(ORY,ORPT,ORLOC) DO EVALCOVR^ORQQPX(.ORY,ORPT,ORLOC)
QUIT
+1 ;
+2 ;ORQQPXRM REMINDER CATEGORIES
CATEGORY(ORY,ORPT,ORLOC) ;
+1 ; DBIA 3078
DO CATEGORY^PXRMRPCA(.ORY,ORPT,ORLOC)
QUIT
+2 ;
+3 ;ORQQPXRM REMINDER DIALOG
DIALOG(ORY,ORREM,DFN,VISITID) ; DBIA 3080
DO DIALOG^PXRMRPCC(.ORY,ORREM,DFN,VISITID)
QUIT
+1 ;
+2 ;ORQQPXRM EDUCATION SUBTOPICS
EDS(ORY,OREDU) ; DBIA 3079
DO EDS^PXRMRPCB(.ORY,OREDU)
QUIT
+1 ;
+2 ;ORQQPXRM EDUCATION SUMMARY
EDL(ORY,OREM) ; DBIA 3079
DO EDL^PXRMRPCB(.ORY,OREM)
QUIT
+1 ;
+2 ;ORQQPXRM EDUCATION TOPIC
EDU(ORY,OREDU) ; DBIA 3079
DO EDU^PXRMRPCB(.ORY,OREDU)
QUIT
+1 ;
+2 ;ORQQPXRM PROGRESS NOTE HEADER
HDR(ORY,ORLOC) ; DBIA 3080
DO HDR^PXRMRPCC(.ORY,ORLOC)
QUIT
+1 ;
+2 ;ORQQPXRM REMINDERS UNEVALUATED
LIST(ORY,ORPT,ORLOC) DO GETLIST^ORQQPX(.ORY,ORLOC)
QUIT
+1 ;
+2 ;ORQQPXRM MENTAL HEALTH
MH(ORY,OTEST) ;
+1 ; DBIA 3080
DO MH^PXRMRPCC(.ORY,OTEST)
+2 SET ORY(0)=0
+3 IF $$PATCH^XPDUTL("YS*5.01*85")
SET ORY(0)=1
+4 QUIT
+5 ;
MHDLL(ORY,DFN,INPUTS,DIEN) ;
+1 NEW CNT,CNT1,ORRESULT,ORSCORES,TEXT
+2 FOR TEXT="RESULTS","SCORES"
Begin DoDot:1
+3 SET CNT=0
SET CNT1=0
+4 FOR
SET CNT=$ORDER(INPUTS(TEXT,CNT))
if CNT=""
QUIT
Begin DoDot:2
+5 SET CNT1=CNT1+1
+6 IF TEXT="RESULTS"
SET ORRESULT(CNT1)=$GET(INPUTS(TEXT,CNT))
+7 IF TEXT="SCORES"
SET ORSCORES(CNT1)=$GET(INPUTS(TEXT,CNT))
End DoDot:2
End DoDot:1
+8 DO MHDLL^PXRMDRSG(.ORY,.ORRESULT,.ORSCORES,DFN,DIEN)
+9 QUIT
+10 ;
+11 ;ORQQPXRM MENTAL HEALTH RESULTS
MHR(ORY,RESULT,ORES) ;
+1 ; DBIA 3080
+2 DO MHR^PXRMRPCC(.ORY,RESULT,.ORES)
+3 QUIT
+4 ;
+5 ;ORQQPXRM MENTAL HEALTH SAVE
MHS(ORY,ORES) ; DBIA 3080
DO MHS^PXRMRPCC(.ORY,.ORES)
QUIT
+1 ;
MHV(ORY,DFN,NAME,ANS) ;
+1 NEW ORDATA,ORES,X
+2 SET ORY(0)=0
+3 IF '$$PATCH^XPDUTL("YS*5.01*85")
SET ORY(0)=2
QUIT
+4 IF '$LENGTH(ANS)
QUIT
+5 SET ORES("DFN")=DFN
SET ORES("CODE")=NAME
+6 FOR X=1:1:$LENGTH(ANS)
IF $EXTRACT(ANS,X)'="X"
Begin DoDot:1
+7 ;I $E(ANS,X)="T" S $E(ANS,X)=1
+8 ;I $E(ANS,X)="F" S $E(ANS,X)=2
+9 SET ORES(X)=X_U_$EXTRACT(ANS,X)
End DoDot:1
+10 DO CHECKCR^YTQPXRM4(.ORDATA,.ORES)
+11 IF $GET(ORDATA(2))="OK"
SET ORY(0)=1
QUIT
+12 SET ORY(1)=$PIECE($GET(ORDATA(2)),U,2)
+13 QUIT
+14 ;
+15 ;ORQQPXRM MST UPDATE
MST(ORY,ORPT,ORDATE,ORSTAT,ORPROV,ORFTYP,ORFIEN,ORRES) ;
+1 DO MST^PXRMRPCC(.ORY,ORPT,ORDATE,ORSTAT,ORPROV,ORFTYP,ORFIEN,ORRES)
QUIT
+2 ;
+3 ;ORQQPXRM WOMEN HEALTH RESULT
WH(ORY,ORRESULT) ;
+1 DO WH^PXRMRPCC(.ORY,.ORRESULT)
QUIT
+2 ;
WHLETTER(ORY,ORIEN) ;
+1 DO LETTER^WVRPCNO1(.ORY,ORIEN)
QUIT
+2 ;
WHREPORT(ORY,ORIEN) ;
+1 DO RESULTS^WVALERTF(.ORY,ORIEN)
QUIT
+2 ;
+3 ;ORQQPXRM DIALOG PROMPTS
PROMPT(ORY,ORDLG,ORDCUR,ORFTYP,ORIEN,NDATA) ;
+1 ; DBIA 3080
DO PROMPT^PXRMRPCC(.ORY,ORDLG,ORDCUR,ORFTYP,ORIEN,.NDATA)
QUIT
+2 ;
+3 ;ORQQPXRM REMINDER DETAIL
REMDET(ORY,ORPT,ORIEN) ; DBIA 3078
DO REMDET^PXRMRPCA(.ORY,ORPT,ORIEN)
QUIT
+1 ;
+2 ;ORQQPXRM REMINDER INQUIRY
RES(ORY,ORREM) ; DBIA 3080
DO RES^PXRMRPCC(.ORY,ORREM)
QUIT
+1 ;
+2 ;ORQQPXRM REMINDER WEB
WEB(ORY,ORREM) ; DBIA 3078
DO WEB^PXRMRPCA(.ORY,ORREM)
QUIT
+1 ;
+2 ;PXRM REMINDER DIALOG (TIU)
TDIALOG(ORY,ORDLG,DFN,VISITID) DO DIALOG^PXRMRPCD(.ORY,ORDLG,DFN,VISITID)
QUIT
+1 ;
ACT(REM) ;ORQQPX SEARCH ITEMS - XPAR value screen for active reminders
+1 ;Treat a null value as inactive
+2 IF 'REM
QUIT 0
+3 ;Check IF inactive flag is set
+4 ; DBIA 2182
IF ($TEXT(INACTIVE^PXRM)'="")
IF $$INACTIVE^PXRM(REM)
QUIT 0
+5 ;Otherwise active
+6 QUIT 1
+7 ;
REMVER(ORLIST) ;
+1 SET ORLIST=$$VERSION^XPDUTL("PXRM")
+2 QUIT
+3 ;
GEC(ORRESULT,IEN,DFN,VISIT,NOTEIEN) ;
+1 DO API^PXRMGECU(.ORRESULT,IEN,DFN,VISIT,1,NOTEIEN)
+2 QUIT
+3 ;
GECF(RESULT,DFN,FIN) ;
+1 DO FINISHED^PXRMGECU(DFN,FIN)
+2 QUIT
+3 ;
GECP(RESULT,DFN) ;
+1 SET RESULT=$$STATUS^PXRMGECU(DFN)
+2 QUIT
+3 ;
+4 ;ORQQPXRM REMINDER LINK SEQ
AFFSEQ(RESULT,LINK) DO GETLSEQ^PXRMDLLB(.RESULT,+$GET(LINK))
QUIT
+1 ;