SDEC52C ;ALB/BLB - VISTA SCHEDULING RPCS ;APR 14, 2021@10:48
;;5.3;Scheduling;**784,785**;Aug 13, 1993;Build 14
;
;Reference is made to ICR #10035
Q
;
RECGET(SDECY,DFN) ;Return a list of OPEN recall appointment types for patient
;INPUT - DFN (Date File Number) Pointer to PATIENT (#2) File.
;RETURN PARAMETER:
;List of recalls associated with a given patient
;Data is delimited by carat (^).
; Field List:
; (1) Internal IEN
; (2) Accession #
; (3) Comment
; (4) Fast/Non-Fasting
; (5) Test/App
; (6) Provider IEN
; (7) Provider Name
; (8) Clinic IEN
; (9) Clinic Name
; (10) Length of Appointment
; (11) Recall Date
; (12) Recall Date (Per Patient)
; (13) Date Reminder Sent
; (14) Second Print
; (15) Date/Time Recall Added
; (16) GAF Score
; (17) Patient Sensitive & Record Access Checks
; (18) Similar Patient Data
; (19) Number of Call Attempts
; (20) Recall Reminders Letter Date
;
N ERR,IEN,NUM,F,IENS,ACCESION,COMM,FASTING,RRAPPTYP,RRPROVIEN,PROVNAME,CLINIEN,SDTMP,NUM,SDECI
N CLINNAME,APPTLEN,DATE,DATE1,DAPTDT,DATE2,DATE3,MSGTYP,GAF,SENSITIVE,SIMILAR,SDREC,CPHONE,CLET
D INIT ; initialize variables/ build header
I '$D(^DPT(DFN,0)) S NUM=NUM+1 D NODATA("PATIENT") Q ; send error and quit if patient does not exist
I '$D(^SD(403.5,"B",DFN)) S NUM=NUM+1 D NODATA("RECALL") Q ; send error and quit if patient has no entry in the RECALL REMINDERS File (403.5)
F S IEN=$O(^SD(403.5,"B",DFN,IEN)) Q:IEN="" D
.D RECDATA(DFN,IEN) ; build out recall data
.D PATDATA(DFN,IEN) ; build out required patient data
.D BUILDER ; build return
S ^TMP("SDEC52C",$J,"RECGET",NUM)=^TMP("SDEC52C",$J,"RECGET",NUM)_$C(31)
Q
BUILDER ;
S NUM=NUM+1
S SDTMP=IEN_U_ACCESION_U_COMM_U_FASTING_U_RRAPPTYP_U_RRPROVIEN_U_PROVNAME_U_CLINIEN_U_CLINNAME_U_APPTLEN_U_DATE_U_DATE1
; internal IEN^accession^comment^fast/nonfasting^test/app^provider IEN^provider name^clinic IEN^clinic name^length of appt^recall date^recall date(per patient)
S SDTMP=SDTMP_U_DAPTDT_U_DATE2_U_DATE3_U_GAF_U_SENSITIVE_U_SIMILAR_U_CPHONE_U_CLET
; date reminder sent^second print^date/time recall added^GAF score^patient sensitive^similar patient data^# call attempts^recall reminders letter date
S ^TMP("SDEC52C",$J,"RECGET",NUM)=SDTMP_$C(30)
Q
INIT ;
S DFN=$G(DFN)
S ERR=0,IEN=0,NUM=0
S SDECY="^TMP(""SDEC52C"","_$J_",""RECGET"")"
K ^TMP("SDEC52C",$J,"RECGET")
S SDTMP="T00030IEN^T00030ACCESION^T00030COMM^T00030FASTING^T00030RRAPPTYP^T00030RRPROVIEN"
S SDTMP=SDTMP_"^T00030PROVNAME^T00030CLINIEN^T00030CLINNAME^T00030APPTLEN^T00030DATE"
S SDTMP=SDTMP_"^T00030DATE1^T00030DAPTDT^T00030DATE2^T00030DATE3^T00030GAF^T00030SENSITIVE"
S SDTMP=SDTMP_"^T00030SIMILAR^T00030CPHONE^T00030CLET"
S ^TMP("SDEC52C",$J,"RECGET",NUM)=SDTMP_$C(30)
Q
RECDATA(DFN,IEN) ;
N RECARY
D GETS^DIQ(403.5,IEN,"**","IE","RECARY","SDMSG")
S F=403.5
S IENS=IEN_","
S ACCESION=$G(RECARY(F,IENS,2,"E"))
S COMM=$G(RECARY(F,IENS,2.5,"E"))
S FASTING=$G(RECARY(F,IENS,2.6,"I"))
S RRAPPTYP=$G(RECARY(F,IENS,3,"I"))
S RRPROVIEN=$G(RECARY(F,IENS,4,"I"))
S PROVNAME=$$GET1^DIQ(403.54,RRPROVIEN,.01,"E")
S CLINIEN=$G(RECARY(F,IENS,4.5,"I"))
S CLINNAME=$G(RECARY(F,IENS,4.5,"E"))
S APPTLEN=$G(RECARY(F,IENS,4.7,"E"))
S DATE=$G(RECARY(F,IENS,5,"I")) S DATE=$$FMTE^XLFDT(DATE)
S DATE1=$G(RECARY(F,IENS,5.5,"I")) S DATE1=$$FMTE^XLFDT(DATE1)
S DAPTDT=$G(RECARY(F,IENS,6,"I")) S DAPTDT=$$FMTE^XLFDT(DAPTDT)
S DATE2=$G(RECARY(F,IENS,8,"I")) S DATE2=$$FMTE^XLFDT(DATE2)
S DATE3=$G(RECARY(403.5,IENS,7.5,"E")) S DATE3=$$FMTE^XLFDT(DATE3)
Q
PATDATA(DFN,IEN) ;
S GAF=$$GAF^SDECU2(DFN)
S SENSITIVE=$$PTSEC^SDECUTL(DFN)
S SIMILAR=$$SIM^SDECU3(DFN)
S SDREC=$$RECALL^SDECAR1A(DFN,IEN),CPHONE=$P(SDREC,U),CLET=$P(SDREC,U,2)
Q
NODATA(MSGTYP) ;differentiate between error messages based on NO recall data, patient data, invalid recall IEN, and invalid patient DFN
I MSGTYP="RECALL" D ERR1^SDECERR(-1,"No recall associated with this patient.",NUM,SDECY) Q
; checking for entry in recall reminder file
I MSGTYP="PATIENT" D ERR1^SDECERR(-1,"Invalid Patient ID.",NUM,SDECY) Q
; checking for entry in patient file
Q
RECGETONE(SDECY,IEN) ;Return a single OPEN recall appointment type based on the IEN passed
;INPUT - IEN (Internal Entry Number) RECALL REMINDERS File (403.5)
;RETURN PARAMETER: recall based on IEN being passed
;Data is delimited by carat (^).
; Field List:
; (1) Internal IEN
; (2) Accession #
; (3) Comment
; (4) Fast/Non-Fasting
; (5) Test/App
; (6) Provider IEN
; (7) Provider Name
; (8) Clinic IEN
; (9) Clinic Name
; (10) Length of Appointment
; (11) Recall Date
; (12) Recall Date (Per Patient)
; (13) Date Reminder Sent
; (14) Second Print
; (15) Date/Time Recall Added
; (16) GAF Score
; (17) Patient Sensitive & Record Access Checks
; (18) Similar Patient Data
; (19) Number of Call Attempts
; (20) Recall Reminders Letter Date
;
N ERR,NUM,F,IENS,ACCESION,COMM,FASTING,RRAPPTYP,RRPROVIEN,PROVNAME,CLINIEN,SDTMP,NUM,SDECI,DFN
N CLINNAME,APPTLEN,DATE,DATE1,DAPTDT,DATE2,DATE3,MSGTYP,GAF,SENSITIVE,SIMILAR,SDREC,CPHONE,CLET
D INITONE ; initialize variables/ build header
I '$D(^SD(403.5,IEN)) S NUM=NUM+1 D NODATAONE("RECALL") Q ; send error and quit if patient has no entry in the RECALL REMINDERS File (403.5)
D RECDATAONE(IEN) ; build out recall data
D PATDATAONE(IEN) ; build out required patient data
D BUILDERONE ; build return
S ^TMP("SDEC52C",$J,"RECGET",NUM)=^TMP("SDEC52C",$J,"RECGET",NUM)_$C(31)
Q
BUILDERONE ;
S NUM=NUM+1
S SDTMP=IEN_U_ACCESION_U_COMM_U_FASTING_U_RRAPPTYP_U_RRPROVIEN_U_PROVNAME_U_CLINIEN_U_CLINNAME_U_APPTLEN_U_DATE_U_DATE1
; internal IEN^accession^comment^fast/nonfasting^test/app^provider IEN^provider name^clinic IEN^clinic name^length of appt^recall date^recall date(per patient)
S SDTMP=SDTMP_U_DAPTDT_U_DATE2_U_DATE3_U_GAF_U_SENSITIVE_U_SIMILAR_U_CPHONE_U_CLET
; date reminder sent^second print^date/time recall added^GAF score^patient sensitive^similar patient data^# call attempts^recall reminders letter date
S ^TMP("SDEC52C",$J,"RECGET",NUM)=SDTMP_$C(30)
Q
INITONE ;
S ERR=0,NUM=0
S SDECY="^TMP(""SDEC52C"","_$J_",""RECGET"")"
K ^TMP("SDEC52C",$J,"RECGET")
S SDTMP="T00030IEN^T00030ACCESION^T00030COMM^T00030FASTING^T00030RRAPPTYP^T00030RRPROVIEN"
S SDTMP=SDTMP_"^T00030PROVNAME^T00030CLINIEN^T00030CLINNAME^T00030APPTLEN^T00030DATE"
S SDTMP=SDTMP_"^T00030DATE1^T00030DAPTDT^T00030DATE2^T00030DATE3^T00030GAF^T00030SENSITIVE"
S SDTMP=SDTMP_"^T00030SIMILAR^T00030CPHONE^T00030CLET"
S ^TMP("SDEC52C",$J,"RECGET",NUM)=SDTMP_$C(30)
Q
RECDATAONE(IEN) ;
N RECARY
D GETS^DIQ(403.5,IEN,"**","IE","RECARY","SDMSG")
S F=403.5
S IENS=IEN_","
S ACCESION=$G(RECARY(F,IENS,2,"E"))
S COMM=$G(RECARY(F,IENS,2.5,"E"))
S FASTING=$G(RECARY(F,IENS,2.6,"I"))
S RRAPPTYP=$G(RECARY(F,IENS,3,"I"))
S RRPROVIEN=$G(RECARY(F,IENS,4,"I"))
S PROVNAME=$$GET1^DIQ(403.54,RRPROVIEN,.01,"E")
S CLINIEN=$G(RECARY(F,IENS,4.5,"I"))
S CLINNAME=$G(RECARY(F,IENS,4.5,"E"))
S APPTLEN=$G(RECARY(F,IENS,4.7,"E"))
S DATE=$G(RECARY(F,IENS,5,"I")) S DATE=$$FMTE^XLFDT(DATE)
S DATE1=$G(RECARY(F,IENS,5.5,"I")) S DATE1=$$FMTE^XLFDT(DATE1)
S DAPTDT=$G(RECARY(F,IENS,6,"I")) S DAPTDT=$$FMTE^XLFDT(DAPTDT)
S DATE2=$G(RECARY(F,IENS,8,"I")) S DATE2=$$FMTE^XLFDT(DATE2)
S DATE3=$G(RECARY(403.5,IENS,7.5,"E")) S DATE3=$$FMTE^XLFDT(DATE3)
Q
PATDATAONE(IEN) ;
S DFN=$$GET1^DIQ(403.5,IEN,.01,"I")
S GAF=$$GAF^SDECU2(DFN)
S SENSITIVE=$$PTSEC^SDECUTL(DFN)
S SIMILAR=$$SIM^SDECU3(DFN)
S SDREC=$$RECALL^SDECAR1A(DFN,IEN),CPHONE=$P(SDREC,U),CLET=$P(SDREC,U,2)
Q
NODATAONE(MSGTYP) ;differentiate between error messages based on NO recall data, patient data, invalid recall IEN, and invalid patient DFN
I MSGTYP="RECALL" D ERR1^SDECERR(-1,"No recall associated with the IEN.",NUM,SDECY) Q
; checking for entry in recall reminder file
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDEC52C 8113 printed Nov 22, 2024@18:00:48 Page 2
SDEC52C ;ALB/BLB - VISTA SCHEDULING RPCS ;APR 14, 2021@10:48
+1 ;;5.3;Scheduling;**784,785**;Aug 13, 1993;Build 14
+2 ;
+3 ;Reference is made to ICR #10035
+4 QUIT
+5 ;
RECGET(SDECY,DFN) ;Return a list of OPEN recall appointment types for patient
+1 ;INPUT - DFN (Date File Number) Pointer to PATIENT (#2) File.
+2 ;RETURN PARAMETER:
+3 ;List of recalls associated with a given patient
+4 ;Data is delimited by carat (^).
+5 ; Field List:
+6 ; (1) Internal IEN
+7 ; (2) Accession #
+8 ; (3) Comment
+9 ; (4) Fast/Non-Fasting
+10 ; (5) Test/App
+11 ; (6) Provider IEN
+12 ; (7) Provider Name
+13 ; (8) Clinic IEN
+14 ; (9) Clinic Name
+15 ; (10) Length of Appointment
+16 ; (11) Recall Date
+17 ; (12) Recall Date (Per Patient)
+18 ; (13) Date Reminder Sent
+19 ; (14) Second Print
+20 ; (15) Date/Time Recall Added
+21 ; (16) GAF Score
+22 ; (17) Patient Sensitive & Record Access Checks
+23 ; (18) Similar Patient Data
+24 ; (19) Number of Call Attempts
+25 ; (20) Recall Reminders Letter Date
+26 ;
+27 NEW ERR,IEN,NUM,F,IENS,ACCESION,COMM,FASTING,RRAPPTYP,RRPROVIEN,PROVNAME,CLINIEN,SDTMP,NUM,SDECI
+28 NEW CLINNAME,APPTLEN,DATE,DATE1,DAPTDT,DATE2,DATE3,MSGTYP,GAF,SENSITIVE,SIMILAR,SDREC,CPHONE,CLET
+29 ; initialize variables/ build header
DO INIT
+30 ; send error and quit if patient does not exist
IF '$DATA(^DPT(DFN,0))
SET NUM=NUM+1
DO NODATA("PATIENT")
QUIT
+31 ; send error and quit if patient has no entry in the RECALL REMINDERS File (403.5)
IF '$DATA(^SD(403.5,"B",DFN))
SET NUM=NUM+1
DO NODATA("RECALL")
QUIT
+32 FOR
SET IEN=$ORDER(^SD(403.5,"B",DFN,IEN))
if IEN=""
QUIT
Begin DoDot:1
+33 ; build out recall data
DO RECDATA(DFN,IEN)
+34 ; build out required patient data
DO PATDATA(DFN,IEN)
+35 ; build return
DO BUILDER
End DoDot:1
+36 SET ^TMP("SDEC52C",$JOB,"RECGET",NUM)=^TMP("SDEC52C",$JOB,"RECGET",NUM)_$CHAR(31)
+37 QUIT
BUILDER ;
+1 SET NUM=NUM+1
+2 SET SDTMP=IEN_U_ACCESION_U_COMM_U_FASTING_U_RRAPPTYP_U_RRPROVIEN_U_PROVNAME_U_CLINIEN_U_CLINNAME_U_APPTLEN_U_DATE_U_DATE1
+3 ; internal IEN^accession^comment^fast/nonfasting^test/app^provider IEN^provider name^clinic IEN^clinic name^length of appt^recall date^recall date(per patient)
+4 SET SDTMP=SDTMP_U_DAPTDT_U_DATE2_U_DATE3_U_GAF_U_SENSITIVE_U_SIMILAR_U_CPHONE_U_CLET
+5 ; date reminder sent^second print^date/time recall added^GAF score^patient sensitive^similar patient data^# call attempts^recall reminders letter date
+6 SET ^TMP("SDEC52C",$JOB,"RECGET",NUM)=SDTMP_$CHAR(30)
+7 QUIT
INIT ;
+1 SET DFN=$GET(DFN)
+2 SET ERR=0
SET IEN=0
SET NUM=0
+3 SET SDECY="^TMP(""SDEC52C"","_$JOB_",""RECGET"")"
+4 KILL ^TMP("SDEC52C",$JOB,"RECGET")
+5 SET SDTMP="T00030IEN^T00030ACCESION^T00030COMM^T00030FASTING^T00030RRAPPTYP^T00030RRPROVIEN"
+6 SET SDTMP=SDTMP_"^T00030PROVNAME^T00030CLINIEN^T00030CLINNAME^T00030APPTLEN^T00030DATE"
+7 SET SDTMP=SDTMP_"^T00030DATE1^T00030DAPTDT^T00030DATE2^T00030DATE3^T00030GAF^T00030SENSITIVE"
+8 SET SDTMP=SDTMP_"^T00030SIMILAR^T00030CPHONE^T00030CLET"
+9 SET ^TMP("SDEC52C",$JOB,"RECGET",NUM)=SDTMP_$CHAR(30)
+10 QUIT
RECDATA(DFN,IEN) ;
+1 NEW RECARY
+2 DO GETS^DIQ(403.5,IEN,"**","IE","RECARY","SDMSG")
+3 SET F=403.5
+4 SET IENS=IEN_","
+5 SET ACCESION=$GET(RECARY(F,IENS,2,"E"))
+6 SET COMM=$GET(RECARY(F,IENS,2.5,"E"))
+7 SET FASTING=$GET(RECARY(F,IENS,2.6,"I"))
+8 SET RRAPPTYP=$GET(RECARY(F,IENS,3,"I"))
+9 SET RRPROVIEN=$GET(RECARY(F,IENS,4,"I"))
+10 SET PROVNAME=$$GET1^DIQ(403.54,RRPROVIEN,.01,"E")
+11 SET CLINIEN=$GET(RECARY(F,IENS,4.5,"I"))
+12 SET CLINNAME=$GET(RECARY(F,IENS,4.5,"E"))
+13 SET APPTLEN=$GET(RECARY(F,IENS,4.7,"E"))
+14 SET DATE=$GET(RECARY(F,IENS,5,"I"))
SET DATE=$$FMTE^XLFDT(DATE)
+15 SET DATE1=$GET(RECARY(F,IENS,5.5,"I"))
SET DATE1=$$FMTE^XLFDT(DATE1)
+16 SET DAPTDT=$GET(RECARY(F,IENS,6,"I"))
SET DAPTDT=$$FMTE^XLFDT(DAPTDT)
+17 SET DATE2=$GET(RECARY(F,IENS,8,"I"))
SET DATE2=$$FMTE^XLFDT(DATE2)
+18 SET DATE3=$GET(RECARY(403.5,IENS,7.5,"E"))
SET DATE3=$$FMTE^XLFDT(DATE3)
+19 QUIT
PATDATA(DFN,IEN) ;
+1 SET GAF=$$GAF^SDECU2(DFN)
+2 SET SENSITIVE=$$PTSEC^SDECUTL(DFN)
+3 SET SIMILAR=$$SIM^SDECU3(DFN)
+4 SET SDREC=$$RECALL^SDECAR1A(DFN,IEN)
SET CPHONE=$PIECE(SDREC,U)
SET CLET=$PIECE(SDREC,U,2)
+5 QUIT
NODATA(MSGTYP) ;differentiate between error messages based on NO recall data, patient data, invalid recall IEN, and invalid patient DFN
+1 IF MSGTYP="RECALL"
DO ERR1^SDECERR(-1,"No recall associated with this patient.",NUM,SDECY)
QUIT
+2 ; checking for entry in recall reminder file
+3 IF MSGTYP="PATIENT"
DO ERR1^SDECERR(-1,"Invalid Patient ID.",NUM,SDECY)
QUIT
+4 ; checking for entry in patient file
+5 QUIT
RECGETONE(SDECY,IEN) ;Return a single OPEN recall appointment type based on the IEN passed
+1 ;INPUT - IEN (Internal Entry Number) RECALL REMINDERS File (403.5)
+2 ;RETURN PARAMETER: recall based on IEN being passed
+3 ;Data is delimited by carat (^).
+4 ; Field List:
+5 ; (1) Internal IEN
+6 ; (2) Accession #
+7 ; (3) Comment
+8 ; (4) Fast/Non-Fasting
+9 ; (5) Test/App
+10 ; (6) Provider IEN
+11 ; (7) Provider Name
+12 ; (8) Clinic IEN
+13 ; (9) Clinic Name
+14 ; (10) Length of Appointment
+15 ; (11) Recall Date
+16 ; (12) Recall Date (Per Patient)
+17 ; (13) Date Reminder Sent
+18 ; (14) Second Print
+19 ; (15) Date/Time Recall Added
+20 ; (16) GAF Score
+21 ; (17) Patient Sensitive & Record Access Checks
+22 ; (18) Similar Patient Data
+23 ; (19) Number of Call Attempts
+24 ; (20) Recall Reminders Letter Date
+25 ;
+26 NEW ERR,NUM,F,IENS,ACCESION,COMM,FASTING,RRAPPTYP,RRPROVIEN,PROVNAME,CLINIEN,SDTMP,NUM,SDECI,DFN
+27 NEW CLINNAME,APPTLEN,DATE,DATE1,DAPTDT,DATE2,DATE3,MSGTYP,GAF,SENSITIVE,SIMILAR,SDREC,CPHONE,CLET
+28 ; initialize variables/ build header
DO INITONE
+29 ; send error and quit if patient has no entry in the RECALL REMINDERS File (403.5)
IF '$DATA(^SD(403.5,IEN))
SET NUM=NUM+1
DO NODATAONE("RECALL")
QUIT
+30 ; build out recall data
DO RECDATAONE(IEN)
+31 ; build out required patient data
DO PATDATAONE(IEN)
+32 ; build return
DO BUILDERONE
+33 SET ^TMP("SDEC52C",$JOB,"RECGET",NUM)=^TMP("SDEC52C",$JOB,"RECGET",NUM)_$CHAR(31)
+34 QUIT
BUILDERONE ;
+1 SET NUM=NUM+1
+2 SET SDTMP=IEN_U_ACCESION_U_COMM_U_FASTING_U_RRAPPTYP_U_RRPROVIEN_U_PROVNAME_U_CLINIEN_U_CLINNAME_U_APPTLEN_U_DATE_U_DATE1
+3 ; internal IEN^accession^comment^fast/nonfasting^test/app^provider IEN^provider name^clinic IEN^clinic name^length of appt^recall date^recall date(per patient)
+4 SET SDTMP=SDTMP_U_DAPTDT_U_DATE2_U_DATE3_U_GAF_U_SENSITIVE_U_SIMILAR_U_CPHONE_U_CLET
+5 ; date reminder sent^second print^date/time recall added^GAF score^patient sensitive^similar patient data^# call attempts^recall reminders letter date
+6 SET ^TMP("SDEC52C",$JOB,"RECGET",NUM)=SDTMP_$CHAR(30)
+7 QUIT
INITONE ;
+1 SET ERR=0
SET NUM=0
+2 SET SDECY="^TMP(""SDEC52C"","_$JOB_",""RECGET"")"
+3 KILL ^TMP("SDEC52C",$JOB,"RECGET")
+4 SET SDTMP="T00030IEN^T00030ACCESION^T00030COMM^T00030FASTING^T00030RRAPPTYP^T00030RRPROVIEN"
+5 SET SDTMP=SDTMP_"^T00030PROVNAME^T00030CLINIEN^T00030CLINNAME^T00030APPTLEN^T00030DATE"
+6 SET SDTMP=SDTMP_"^T00030DATE1^T00030DAPTDT^T00030DATE2^T00030DATE3^T00030GAF^T00030SENSITIVE"
+7 SET SDTMP=SDTMP_"^T00030SIMILAR^T00030CPHONE^T00030CLET"
+8 SET ^TMP("SDEC52C",$JOB,"RECGET",NUM)=SDTMP_$CHAR(30)
+9 QUIT
RECDATAONE(IEN) ;
+1 NEW RECARY
+2 DO GETS^DIQ(403.5,IEN,"**","IE","RECARY","SDMSG")
+3 SET F=403.5
+4 SET IENS=IEN_","
+5 SET ACCESION=$GET(RECARY(F,IENS,2,"E"))
+6 SET COMM=$GET(RECARY(F,IENS,2.5,"E"))
+7 SET FASTING=$GET(RECARY(F,IENS,2.6,"I"))
+8 SET RRAPPTYP=$GET(RECARY(F,IENS,3,"I"))
+9 SET RRPROVIEN=$GET(RECARY(F,IENS,4,"I"))
+10 SET PROVNAME=$$GET1^DIQ(403.54,RRPROVIEN,.01,"E")
+11 SET CLINIEN=$GET(RECARY(F,IENS,4.5,"I"))
+12 SET CLINNAME=$GET(RECARY(F,IENS,4.5,"E"))
+13 SET APPTLEN=$GET(RECARY(F,IENS,4.7,"E"))
+14 SET DATE=$GET(RECARY(F,IENS,5,"I"))
SET DATE=$$FMTE^XLFDT(DATE)
+15 SET DATE1=$GET(RECARY(F,IENS,5.5,"I"))
SET DATE1=$$FMTE^XLFDT(DATE1)
+16 SET DAPTDT=$GET(RECARY(F,IENS,6,"I"))
SET DAPTDT=$$FMTE^XLFDT(DAPTDT)
+17 SET DATE2=$GET(RECARY(F,IENS,8,"I"))
SET DATE2=$$FMTE^XLFDT(DATE2)
+18 SET DATE3=$GET(RECARY(403.5,IENS,7.5,"E"))
SET DATE3=$$FMTE^XLFDT(DATE3)
+19 QUIT
PATDATAONE(IEN) ;
+1 SET DFN=$$GET1^DIQ(403.5,IEN,.01,"I")
+2 SET GAF=$$GAF^SDECU2(DFN)
+3 SET SENSITIVE=$$PTSEC^SDECUTL(DFN)
+4 SET SIMILAR=$$SIM^SDECU3(DFN)
+5 SET SDREC=$$RECALL^SDECAR1A(DFN,IEN)
SET CPHONE=$PIECE(SDREC,U)
SET CLET=$PIECE(SDREC,U,2)
+6 QUIT
NODATAONE(MSGTYP) ;differentiate between error messages based on NO recall data, patient data, invalid recall IEN, and invalid patient DFN
+1 IF MSGTYP="RECALL"
DO ERR1^SDECERR(-1,"No recall associated with the IEN.",NUM,SDECY)
QUIT
+2 ; checking for entry in recall reminder file
+3 QUIT