SDEC52CRMVJSON ;ALB/BLB,LEG,LAB - VIA RECALL REMINDER REMOVE FILE (#403.56) ;MAR 23, 2022@10:48
;;5.3;Scheduling;**790,799,813**;Aug 13, 1993;Build 6
;;Per VHA Directive 6402, this routine should not be modified
;
;Reference is made to ICR #10035
Q
;
RECGETJSON(SDECY,DFN) ;Return a list of REMOVED recall appointment types for patient
;INPUT - DFN (Data File Number) Pointer to PATIENT (#2) File.
;RETURN PARMETER:
;List of recalls associated with a given patient
; 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
; Number of Email Contacts
; Number of Text Contacts
; Number of Secure Messages
;
N SDRECALLRMV,IEN,NUM,ERR,IENS,SDESJSONERR
S DFN=$G(DFN),SDESJSONERR=0
I DFN="" S SDESJSONERR=1 D ERRLOG^SDESJSON(.SDRECALLRMV,1)
S ERR=0,IEN=0,NUM=0
I DFN'="",'$D(^DPT(DFN,0)) S SDESJSONERR=1 D ERRLOG^SDESJSON(.SDRECALLRMV,2)
I 'SDESJSONERR D
. F S IEN=$O(^SD(403.56,"B",DFN,IEN)) Q:IEN="" D
. . S NUM=NUM+1
. . D RECDATA(DFN,IEN)
. . D PATDATA(DFN,IEN)
.I '$D(SDRECALLRMV("Recall")) S SDRECALLRMV("Recall")=""
D BUILDER
Q
;
RECDATA(DFN,IEN) ;
N F,DAPTDT,DATE,DATE1,DATE2,DATE3,RECARY
D GETS^DIQ(403.56,IEN,"**","IE","RECARY","SDMSG")
S F=403.56
S IENS=IEN_","
S SDRECALLRMV("Recall",NUM,"RecallIEN")=IEN
S SDRECALLRMV("Recall",NUM,"Accession")=$G(RECARY(F,IENS,2,"E"))
S SDRECALLRMV("Recall",NUM,"Comment")=$G(RECARY(F,IENS,2.5,"E"))
S SDRECALLRMV("Recall",NUM,"FastingNonFasting")=$G(RECARY(F,IENS,2.6,"I"))
S SDRECALLRMV("Recall",NUM,"TestApp")=$G(RECARY(F,IENS,3,"I"))
S SDRECALLRMV("Recall",NUM,"ProviderIEN")=$G(RECARY(F,IENS,4,"I"))
S SDRECALLRMV("Recall",NUM,"ProviderName")=$$GET1^DIQ(403.54,SDRECALLRMV("Recall",NUM,"ProviderIEN"),.01,"E")
S SDRECALLRMV("Recall",NUM,"ClinicIEN")=$G(RECARY(F,IENS,4.5,"I"))
S SDRECALLRMV("Recall",NUM,"ClinicName")=$G(RECARY(F,IENS,4.5,"E"))
S SDRECALLRMV("Recall",NUM,"AppointmentLength")=$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.56,IENS,7.5,"E")) S DATE3=$$FMTE^XLFDT(DATE3)
S SDRECALLRMV("Recall",NUM,"RecallDate")=DATE
S SDRECALLRMV("Recall",NUM,"RecallDatePerPatient")=DATE1
S SDRECALLRMV("Recall",NUM,"DateReminderSent")=DAPTDT
S SDRECALLRMV("Recall",NUM,"SecondPrint")=DATE2
S SDRECALLRMV("Recall",NUM,"DateTimeRecallAdded")=DATE3
Q
;
PATDATA(DFN,IEN) ;
N SDREC
S SDRECALLRMV("Recall",NUM,"GAFScore")=$$GAF^SDECU2(DFN)
S SDRECALLRMV("Recall",NUM,"PatientSensitiveRecordAccessChecks")=$$PTSEC^SDECUTL(DFN)
S SDRECALLRMV("Recall",NUM,"SimilarPatientData")=$$SIM^SDECU3(DFN)
S SDREC=$$RECALL^SDECAR1A(DFN,IEN)
S SDRECALLRMV("Recall",NUM,"NumberOfCallAttempts")=$P(SDREC,U)
S SDRECALLRMV("Recall",NUM,"RecallRemindersLetterDate")=$P(SDREC,U,2)
S SDRECALLRMV("Recall",NUM,"NumberOfEmailContact")=$P(SDREC,U,3)
S SDRECALLRMV("Recall",NUM,"NumberOfTextContact")=$P(SDREC,U,4)
S SDRECALLRMV("Recall",NUM,"NumberOfSecureMessages")=$P(SDREC,U,5)
Q
;
BUILDER ;
D ENCODE^XLFJSON("SDRECALLRMV","SDECY","ERR")
Q
;
RECGETONERMVJSON(SDECY,DFN) ;Return the latest REMOVED RECALL REMINDER info in JSON format based on the patient DFN
;INPUT - DFN (Data File Number) Pointer to PATIENT (#2) File.
;RETURN PARAMETER: recall based on DFN being passed
; 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,SDESJSONERR
N CLINNAME,APPTLEN,DATE,DATE1,DAPTDT,DATE2,DATE3,MSGTYP,GAF,SENSITIVE,SIMILAR,SDREC,CPHONE,CLET,SDRECALLRMV
S SDESJSONERR=0
; VSE-1066;LEG;6/25/2021 ;
N SDRECALLRMV,IEN
S DFN=$G(DFN)
; check if no DFN
I DFN="" S SDESJSONERR=1 D ERRLOG^SDESJSON(.SDRECALLRMV,1)
S ERR=0,NUM=0
; check for defined DFN
I DFN,'$D(^DPT(DFN,0)) S SDESJSONERR=1 D ERRLOG^SDESJSON(.SDRECALLRMV,2)
; find latest REMOVED RECALL REMINDER info because patient has no entry in the RECALL REMINDERS File (#403.5)
I 'SDESJSONERR S IEN=$O(^SD(403.56,"B",DFN,""),-1)
;
S IEN=$G(IEN)
I IEN,'$D(^SD(403.56,IEN)) S SDESJSONERR=1 D ERRLOG^SDESJSON(.SDRECALLRMV,17) ; send error and quit if patient has no entry in the RECALL REMINDERS REMOVE File (#403.56)
I 'IEN S SDESJSONERR=1 D ERRLOG^SDESJSON(.SDRECALLRMV,16)
I 'SDESJSONERR D
. D RECDATAONEJSON(IEN) ; build out recall data
. D PATDATAONEJSON(IEN) ; build out required patient data
D BUILDER ; build return
Q
;
RECDATAONEJSON(IEN) ;
N RECARY
D GETS^DIQ(403.56,IEN,"**","IE","RECARY","SDMSG")
S F=403.56
S IENS=IEN_","
S NUM=NUM+1
S SDRECALLRMV("Recall",NUM,"RecallIEN")=IEN
S SDRECALLRMV("Recall",NUM,"EASTrackingNumber")=$G(RECARY(F,IENS,100,"E"))
S SDRECALLRMV("Recall",NUM,"Accession")=$G(RECARY(F,IENS,2,"E"))
S SDRECALLRMV("Recall",NUM,"Comment")=$G(RECARY(F,IENS,2.5,"E"))
S SDRECALLRMV("Recall",NUM,"FastingNonFasting")=$G(RECARY(F,IENS,2.6,"I"))
S SDRECALLRMV("Recall",NUM,"TestApp")=$G(RECARY(F,IENS,3,"I"))
S SDRECALLRMV("Recall",NUM,"ProviderIEN")=$G(RECARY(F,IENS,4,"I"))
S SDRECALLRMV("Recall",NUM,"ProviderName")=$$GET1^DIQ(403.54,SDRECALLRMV("Recall",NUM,"ProviderIEN"),.01,"E")
S SDRECALLRMV("Recall",NUM,"ClinicIEN")=$G(RECARY(F,IENS,4.5,"I"))
S SDRECALLRMV("Recall",NUM,"ClinicName")=$G(RECARY(F,IENS,4.5,"E"))
S SDRECALLRMV("Recall",NUM,"AppointmentLength")=$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.56,IENS,7.5,"E")) S DATE3=$$FMTE^XLFDT(DATE3)
S SDRECALLRMV("Recall",NUM,"RecallDate")=DATE
S SDRECALLRMV("Recall",NUM,"RecallDatePerPatient")=DATE1
S SDRECALLRMV("Recall",NUM,"DateReminderSent")=DAPTDT
S SDRECALLRMV("Recall",NUM,"SecondPrint")=DATE2
S SDRECALLRMV("Recall",NUM,"DateTimeRecallAdded")=DATE3
Q
;
PATDATAONEJSON(IEN) ;
N SDECALL,SDECLET
S DFN=$$GET1^DIQ(403.56,IEN,.01,"I")
S SDRECALLRMV("Recall",NUM,"GAFScore")=$$GAF^SDECU2(DFN)
S SDRECALLRMV("Recall",NUM,"PatientSensitiveRecordAccessChecks")=$$PTSEC^SDECUTL(DFN)
S SDRECALLRMV("Recall",NUM,"SimilarPatientData")=$$SIM^SDECU3(DFN)
S SDREC=$$RECALL^SDECAR1A(DFN,IEN)
S SDRECALLRMV("Recall",NUM,"NumberOfCallAttempts")=$P(SDREC,U)
S SDRECALLRMV("Recall",NUM,"RecallRemindersLetterDate")=$P(SDREC,U,2)
S SDRECALLRMV("Recall",NUM,"NumberOfEmailContact")=$P(SDREC,U,3)
S SDRECALLRMV("Recall",NUM,"NumberOfTextContact")=$P(SDREC,U,4)
S SDRECALLRMV("Recall",NUM,"NumberOfSecureMessages")=$P(SDREC,U,5)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDEC52CRMVJSON 7954 printed Dec 13, 2024@02:50:49 Page 2
SDEC52CRMVJSON ;ALB/BLB,LEG,LAB - VIA RECALL REMINDER REMOVE FILE (#403.56) ;MAR 23, 2022@10:48
+1 ;;5.3;Scheduling;**790,799,813**;Aug 13, 1993;Build 6
+2 ;;Per VHA Directive 6402, this routine should not be modified
+3 ;
+4 ;Reference is made to ICR #10035
+5 QUIT
+6 ;
RECGETJSON(SDECY,DFN) ;Return a list of REMOVED recall appointment types for patient
+1 ;INPUT - DFN (Data File Number) Pointer to PATIENT (#2) File.
+2 ;RETURN PARMETER:
+3 ;List of recalls associated with a given patient
+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 ; Number of Email Contacts
+26 ; Number of Text Contacts
+27 ; Number of Secure Messages
+28 ;
+29 NEW SDRECALLRMV,IEN,NUM,ERR,IENS,SDESJSONERR
+30 SET DFN=$GET(DFN)
SET SDESJSONERR=0
+31 IF DFN=""
SET SDESJSONERR=1
DO ERRLOG^SDESJSON(.SDRECALLRMV,1)
+32 SET ERR=0
SET IEN=0
SET NUM=0
+33 IF DFN'=""
IF '$DATA(^DPT(DFN,0))
SET SDESJSONERR=1
DO ERRLOG^SDESJSON(.SDRECALLRMV,2)
+34 IF 'SDESJSONERR
Begin DoDot:1
+35 FOR
SET IEN=$ORDER(^SD(403.56,"B",DFN,IEN))
if IEN=""
QUIT
Begin DoDot:2
+36 SET NUM=NUM+1
+37 DO RECDATA(DFN,IEN)
+38 DO PATDATA(DFN,IEN)
End DoDot:2
+39 IF '$DATA(SDRECALLRMV("Recall"))
SET SDRECALLRMV("Recall")=""
End DoDot:1
+40 DO BUILDER
+41 QUIT
+42 ;
RECDATA(DFN,IEN) ;
+1 NEW F,DAPTDT,DATE,DATE1,DATE2,DATE3,RECARY
+2 DO GETS^DIQ(403.56,IEN,"**","IE","RECARY","SDMSG")
+3 SET F=403.56
+4 SET IENS=IEN_","
+5 SET SDRECALLRMV("Recall",NUM,"RecallIEN")=IEN
+6 SET SDRECALLRMV("Recall",NUM,"Accession")=$GET(RECARY(F,IENS,2,"E"))
+7 SET SDRECALLRMV("Recall",NUM,"Comment")=$GET(RECARY(F,IENS,2.5,"E"))
+8 SET SDRECALLRMV("Recall",NUM,"FastingNonFasting")=$GET(RECARY(F,IENS,2.6,"I"))
+9 SET SDRECALLRMV("Recall",NUM,"TestApp")=$GET(RECARY(F,IENS,3,"I"))
+10 SET SDRECALLRMV("Recall",NUM,"ProviderIEN")=$GET(RECARY(F,IENS,4,"I"))
+11 SET SDRECALLRMV("Recall",NUM,"ProviderName")=$$GET1^DIQ(403.54,SDRECALLRMV("Recall",NUM,"ProviderIEN"),.01,"E")
+12 SET SDRECALLRMV("Recall",NUM,"ClinicIEN")=$GET(RECARY(F,IENS,4.5,"I"))
+13 SET SDRECALLRMV("Recall",NUM,"ClinicName")=$GET(RECARY(F,IENS,4.5,"E"))
+14 SET SDRECALLRMV("Recall",NUM,"AppointmentLength")=$GET(RECARY(F,IENS,4.7,"E"))
+15 SET DATE=$GET(RECARY(F,IENS,5,"I"))
SET DATE=$$FMTE^XLFDT(DATE)
+16 SET DATE1=$GET(RECARY(F,IENS,5.5,"I"))
SET DATE1=$$FMTE^XLFDT(DATE1)
+17 SET DAPTDT=$GET(RECARY(F,IENS,6,"I"))
SET DAPTDT=$$FMTE^XLFDT(DAPTDT)
+18 SET DATE2=$GET(RECARY(F,IENS,8,"I"))
SET DATE2=$$FMTE^XLFDT(DATE2)
+19 SET DATE3=$GET(RECARY(403.56,IENS,7.5,"E"))
SET DATE3=$$FMTE^XLFDT(DATE3)
+20 SET SDRECALLRMV("Recall",NUM,"RecallDate")=DATE
+21 SET SDRECALLRMV("Recall",NUM,"RecallDatePerPatient")=DATE1
+22 SET SDRECALLRMV("Recall",NUM,"DateReminderSent")=DAPTDT
+23 SET SDRECALLRMV("Recall",NUM,"SecondPrint")=DATE2
+24 SET SDRECALLRMV("Recall",NUM,"DateTimeRecallAdded")=DATE3
+25 QUIT
+26 ;
PATDATA(DFN,IEN) ;
+1 NEW SDREC
+2 SET SDRECALLRMV("Recall",NUM,"GAFScore")=$$GAF^SDECU2(DFN)
+3 SET SDRECALLRMV("Recall",NUM,"PatientSensitiveRecordAccessChecks")=$$PTSEC^SDECUTL(DFN)
+4 SET SDRECALLRMV("Recall",NUM,"SimilarPatientData")=$$SIM^SDECU3(DFN)
+5 SET SDREC=$$RECALL^SDECAR1A(DFN,IEN)
+6 SET SDRECALLRMV("Recall",NUM,"NumberOfCallAttempts")=$PIECE(SDREC,U)
+7 SET SDRECALLRMV("Recall",NUM,"RecallRemindersLetterDate")=$PIECE(SDREC,U,2)
+8 SET SDRECALLRMV("Recall",NUM,"NumberOfEmailContact")=$PIECE(SDREC,U,3)
+9 SET SDRECALLRMV("Recall",NUM,"NumberOfTextContact")=$PIECE(SDREC,U,4)
+10 SET SDRECALLRMV("Recall",NUM,"NumberOfSecureMessages")=$PIECE(SDREC,U,5)
+11 QUIT
+12 ;
BUILDER ;
+1 DO ENCODE^XLFJSON("SDRECALLRMV","SDECY","ERR")
+2 QUIT
+3 ;
RECGETONERMVJSON(SDECY,DFN) ;Return the latest REMOVED RECALL REMINDER info in JSON format based on the patient DFN
+1 ;INPUT - DFN (Data File Number) Pointer to PATIENT (#2) File.
+2 ;RETURN PARAMETER: recall based on DFN being passed
+3 ; Field List:
+4 ; (1) Internal IEN
+5 ; (2) Accession #
+6 ; (3) Comment
+7 ; (4) Fast/Non-Fasting
+8 ; (5) Test/App
+9 ; (6) Provider IEN
+10 ; (7) Provider Name
+11 ; (8) Clinic IEN
+12 ; (9) Clinic Name
+13 ; (10) Length of Appointment
+14 ; (11) Recall Date
+15 ; (12) Recall Date (Per Patient)
+16 ; (13) Date Reminder Sent
+17 ; (14) Second Print
+18 ; (15) Date/Time Recall Added
+19 ; (16) GAF Score
+20 ; (17) Patient Sensitive & Record Access Checks
+21 ; (18) Similar Patient Data
+22 ; (19) Number of Call Attempts
+23 ; (20) Recall Reminders Letter Date
+24 ;
+25 NEW ERR,NUM,F,IENS,ACCESION,COMM,FASTING,RRAPPTYP,RRPROVIEN,PROVNAME,CLINIEN,SDTMP,NUM,SDECI,SDESJSONERR
+26 NEW CLINNAME,APPTLEN,DATE,DATE1,DAPTDT,DATE2,DATE3,MSGTYP,GAF,SENSITIVE,SIMILAR,SDREC,CPHONE,CLET,SDRECALLRMV
+27 SET SDESJSONERR=0
+28 ; VSE-1066;LEG;6/25/2021 ;
+29 NEW SDRECALLRMV,IEN
+30 SET DFN=$GET(DFN)
+31 ; check if no DFN
+32 IF DFN=""
SET SDESJSONERR=1
DO ERRLOG^SDESJSON(.SDRECALLRMV,1)
+33 SET ERR=0
SET NUM=0
+34 ; check for defined DFN
+35 IF DFN
IF '$DATA(^DPT(DFN,0))
SET SDESJSONERR=1
DO ERRLOG^SDESJSON(.SDRECALLRMV,2)
+36 ; find latest REMOVED RECALL REMINDER info because patient has no entry in the RECALL REMINDERS File (#403.5)
+37 IF 'SDESJSONERR
SET IEN=$ORDER(^SD(403.56,"B",DFN,""),-1)
+38 ;
+39 SET IEN=$GET(IEN)
+40 ; send error and quit if patient has no entry in the RECALL REMINDERS REMOVE File (#403.56)
IF IEN
IF '$DATA(^SD(403.56,IEN))
SET SDESJSONERR=1
DO ERRLOG^SDESJSON(.SDRECALLRMV,17)
+41 IF 'IEN
SET SDESJSONERR=1
DO ERRLOG^SDESJSON(.SDRECALLRMV,16)
+42 IF 'SDESJSONERR
Begin DoDot:1
+43 ; build out recall data
DO RECDATAONEJSON(IEN)
+44 ; build out required patient data
DO PATDATAONEJSON(IEN)
End DoDot:1
+45 ; build return
DO BUILDER
+46 QUIT
+47 ;
RECDATAONEJSON(IEN) ;
+1 NEW RECARY
+2 DO GETS^DIQ(403.56,IEN,"**","IE","RECARY","SDMSG")
+3 SET F=403.56
+4 SET IENS=IEN_","
+5 SET NUM=NUM+1
+6 SET SDRECALLRMV("Recall",NUM,"RecallIEN")=IEN
+7 SET SDRECALLRMV("Recall",NUM,"EASTrackingNumber")=$GET(RECARY(F,IENS,100,"E"))
+8 SET SDRECALLRMV("Recall",NUM,"Accession")=$GET(RECARY(F,IENS,2,"E"))
+9 SET SDRECALLRMV("Recall",NUM,"Comment")=$GET(RECARY(F,IENS,2.5,"E"))
+10 SET SDRECALLRMV("Recall",NUM,"FastingNonFasting")=$GET(RECARY(F,IENS,2.6,"I"))
+11 SET SDRECALLRMV("Recall",NUM,"TestApp")=$GET(RECARY(F,IENS,3,"I"))
+12 SET SDRECALLRMV("Recall",NUM,"ProviderIEN")=$GET(RECARY(F,IENS,4,"I"))
+13 SET SDRECALLRMV("Recall",NUM,"ProviderName")=$$GET1^DIQ(403.54,SDRECALLRMV("Recall",NUM,"ProviderIEN"),.01,"E")
+14 SET SDRECALLRMV("Recall",NUM,"ClinicIEN")=$GET(RECARY(F,IENS,4.5,"I"))
+15 SET SDRECALLRMV("Recall",NUM,"ClinicName")=$GET(RECARY(F,IENS,4.5,"E"))
+16 SET SDRECALLRMV("Recall",NUM,"AppointmentLength")=$GET(RECARY(F,IENS,4.7,"E"))
+17 SET DATE=$GET(RECARY(F,IENS,5,"I"))
SET DATE=$$FMTE^XLFDT(DATE)
+18 SET DATE1=$GET(RECARY(F,IENS,5.5,"I"))
SET DATE1=$$FMTE^XLFDT(DATE1)
+19 SET DAPTDT=$GET(RECARY(F,IENS,6,"I"))
SET DAPTDT=$$FMTE^XLFDT(DAPTDT)
+20 SET DATE2=$GET(RECARY(F,IENS,8,"I"))
SET DATE2=$$FMTE^XLFDT(DATE2)
+21 SET DATE3=$GET(RECARY(403.56,IENS,7.5,"E"))
SET DATE3=$$FMTE^XLFDT(DATE3)
+22 SET SDRECALLRMV("Recall",NUM,"RecallDate")=DATE
+23 SET SDRECALLRMV("Recall",NUM,"RecallDatePerPatient")=DATE1
+24 SET SDRECALLRMV("Recall",NUM,"DateReminderSent")=DAPTDT
+25 SET SDRECALLRMV("Recall",NUM,"SecondPrint")=DATE2
+26 SET SDRECALLRMV("Recall",NUM,"DateTimeRecallAdded")=DATE3
+27 QUIT
+28 ;
PATDATAONEJSON(IEN) ;
+1 NEW SDECALL,SDECLET
+2 SET DFN=$$GET1^DIQ(403.56,IEN,.01,"I")
+3 SET SDRECALLRMV("Recall",NUM,"GAFScore")=$$GAF^SDECU2(DFN)
+4 SET SDRECALLRMV("Recall",NUM,"PatientSensitiveRecordAccessChecks")=$$PTSEC^SDECUTL(DFN)
+5 SET SDRECALLRMV("Recall",NUM,"SimilarPatientData")=$$SIM^SDECU3(DFN)
+6 SET SDREC=$$RECALL^SDECAR1A(DFN,IEN)
+7 SET SDRECALLRMV("Recall",NUM,"NumberOfCallAttempts")=$PIECE(SDREC,U)
+8 SET SDRECALLRMV("Recall",NUM,"RecallRemindersLetterDate")=$PIECE(SDREC,U,2)
+9 SET SDRECALLRMV("Recall",NUM,"NumberOfEmailContact")=$PIECE(SDREC,U,3)
+10 SET SDRECALLRMV("Recall",NUM,"NumberOfTextContact")=$PIECE(SDREC,U,4)
+11 SET SDRECALLRMV("Recall",NUM,"NumberOfSecureMessages")=$PIECE(SDREC,U,5)
+12 QUIT