Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SDES

SDES.m

Go to the documentation of this file.
SDES ;ALB/KML,RRM,RRM,BWF,BLB,ANU,LAB,MGD,LAB - VISTA SCHEDULING RPCS ;FEB 13,2023
 ;;5.3;Scheduling;**788,790,792,794,797,799,800,801,803,804,805,807,809,813,814,815,818,819,824,825,826,836**;Aug 13, 1993;Build 20
 ;;Per VHA Directive 6402, this routine should not be modified
 Q
 ; This routine documents the entry points for the new VS GUI version 3.0.
 ;
GETFLAGS(JSON,DFN,EAS)    ; RPC: SDES GET PATIENT FLAGS
 D GETFLAGS^SDESPATFLAGS(.JSON,$G(DFN),$G(EAS)) Q
DISPOSITION(RET,ARIEN,DISP,DISPBY,DISPDT,EAS,PCMT) ;RPC: SDES ARCLOSE
 D DISPOSITION^SDESARCLOSE(.RET,$G(ARIEN),$G(DISP),$G(DISPBY),$G(DISPDT),$G(EAS),$G(PCMT)) Q
APPTBLOCKMOVE(RETURN,APPTIEN,SDRES,APPTDTTM,EAS) ; RPC: SDES CREATE APPT BLK AND MOVE
 D APPTBLOCKMOVE^SDESBLKANDMOVE(.RETURN,$G(APPTIEN),$G(SDRES),$G(APPTDTTM),$G(EAS)) Q
APPTBYCLINIC(JSON,CLINICIEN,SDBEG,SDEND,EAS) ;SDES GET APPT BY CLINIC
 D GETAPPTSBYCLINIC^SDESAPPT(.JSON,$G(CLINICIEN),$G(SDBEG),$G(SDEND),$G(EAS)) Q
APPTBYCLINICLIST(APPTLISTJSON,CLINICIENS) ;SDES GET APPTS BY CLINIC LIST
 D APPTBYCLINICLIST^SDESAPPT(.APPTLISTJSON,.CLINICIENS) Q
APPTBYRESOURCE(JSON,RESIEN,SDBEG,SDEND,EAS) ;SDES GET APPT BY RESOURCE
 D APPTBYRESOURCE^SDESAPPT(.JSON,$G(RESIEN),$G(SDBEG),$G(SDEND),$G(EAS)) Q
APPGETJSON(JSON,DFN,SDBEG,SDEND,EAS) ;
 D APPGETJSON^SDESAPPT(.JSON,$G(DFN),$G(SDBEG),$G(SDEND),$G(EAS)) Q
APPGETONEJSON(JSON,APPTIEN,EAS) ;
 D APPGETONEJSON^SDESAPPT(.JSON,$G(APPTIEN),$G(EAS)) Q
APPTBYRIENAPTYP(JSON,APTREQIEN,APTREQTYPE,SDEAS) ;
 D APPTBYRIENAPTYP^SDESAPPT(.JSON,$G(APTREQIEN),$G(APTREQTYPE),$G(SDEAS)) Q
 ; Parameter list for APTREQCREATE and APTREQUPDATE   *MUST*  be kept in sync.
APTREQCREATE(JSON,ARIEN,DFN,EDT,INST,TYPE,CLIN,USER,REQBY,PROV,DAPTDT,COMM,ENPRI,MAR,MAI,AMRAN,PATCONT,SVCCON,SVCCOP,MRTCDT,STOP,APTYP,PATSTAT,MULTAPTMDE,PARENT,NLT,PRER,ORDN,VAOSGUID,EAS,PCMT,INSTIEN,PATDATEPREFS,ARSTOPSEC,MODALITY) ;
 S ARIEN=""  ;There will never be an IEN when calling this RPC
 D ARSET Q
APTREQUPDATE(JSON,ARIEN,DFN,EDT,INST,TYPE,CLIN,USER,REQBY,PROV,DAPTDT,COMM,ENPRI,MAR,MAI,AMRAN,PATCONT,SVCCON,SVCCOP,MRTCDT,STOP,APTYP,PATSTAT,MULTAPTMDE,PARENT,NLT,PRER,ORDN,VAOSGUID,EAS,PCMT,INSTIEN,PATDATEPREFS,ARSTOPSEC,MODALITY) ;
 S ARIEN=$G(ARIEN,"")
 S:ARIEN="" ARIEN=-1  ;Flag missing ARIEN when calling the update RPC
 D ARSET Q
ARSET ;Called from APTREQCREATE and APTREQUPDATE tags
 S DFN=$G(DFN),EDT=$G(EDT),INST=$G(INST),TYPE=$G(TYPE),CLIN=$G(CLIN),USER=$G(USER),REQBY=$G(REQBY),PROV=$G(PROV),DAPTDT=$G(DAPTDT),COMM=$G(COMM),ENPRI=$G(ENPRI)
 S MAR=$G(MAR),MAI=$G(MAI),AMRAN=$G(AMRAN),PATCONT=$G(PATCONT),SVCCON=$G(SVCCON),SVCCOP=$G(SVCCOP),MRTCDT=$G(MRTCDT),STOP=$G(STOP),APTYP=$G(APTYP),PATSTAT=$G(PATSTAT)
 S MULTAPTMDE=$G(MULTAPTMDE),PARENT=$G(PARENT),NLT=$G(NLT),PRER=$G(PRER),ORDN=$G(ORDN),VAOSGUID=$G(VAOSGUID)
 S EAS=$G(EAS),PCMT=$G(PCMT),INSTIEN=$G(INSTIEN),ARSTOPSEC=$G(ARSTOPSEC),MODALITY=$G(MODALITY)
 I '$D(PATDATEPREFS) S PATDATEPREFS=""
 ; Because of an SAC limitation on the number of chars per line, addition of more parameters will require
 ; this to be changed over to passing an array.
 D ARSET^SDESAPTREQSET(.JSON,ARIEN,DFN,EDT,INST,TYPE,CLIN,USER,REQBY,PROV,DAPTDT,COMM,ENPRI,MAR,MAI,AMRAN,PATCONT,SVCCON,SVCCOP,MRTCDT,STOP,APTYP,PATSTAT,MULTAPTMDE,PARENT,NLT,PRER,ORDN,VAOSGUID,EAS,PCMT,INSTIEN,.PATDATEPREFS,ARSTOPSEC,MODALITY)
 Q
 ; Appointment Request Create/Edit
 ; SD*5.3*806
APTREQ44CRT(JSON,ARIEN,DFN,ARDAPTDT,ARLEN,ARRSN,ARUSER,ARODT,PATELG,AROVB) ; Create Appointment in #44
 N ARUPD
 S ARUPD=0
 D ARSET44
 Q
APTREQ44EDIT(JSON,ARIEN,DFN,ARDAPTDT,ARLEN,ARRSN,ARUSER,ARODT,PATELG,AROVB) ; Edit Appointment in #44
 N ARUPD
 S ARUPD=1
 D ARSET44
 Q
APTREQ40984CRT(JSON,SDAPTSTDTTM,SDAPTEDTTM,SDPATDFN,SDRESOURCE,SDATYPID,SDDDTTM,SDEXTID,SDAPTREQTYP,SDPROVIEN,SDCLNID,SDNOTE,SDAPTYP,SDEESTAT,SDAPTLEN,SDEAS) ; Create Appointment in #409.84
 D ARSET^SDESAPPTREQ40984(.JSON,$G(SDAPTSTDTTM),$G(SDAPTEDTTM),$G(SDPATDFN),$G(SDRESOURCE),$G(SDATYPID),$G(SDDDTTM),$G(SDEXTID),$G(SDAPTREQTYP),$G(SDPROVIEN),$G(SDCLNID),$G(SDNOTE),$G(SDAPTYP),$G(SDEESTAT),$G(SDAPTLEN),$G(SDEAS))
 Q
APTREQ40984EDIT(JSON,SDECAPTID,SDECNOTE,SDECLEN) ;Edit Appointment in SDEC APPOINTMENT File #409.84 - RPC: SDES EDIT APPT #409.84
 D EDITAPPT^SDESAPPTEDIT(.JSON,$G(SDECAPTID),$G(SDECNOTE),$G(SDECLEN))
 Q
ARSET44 ; Create/Edit Appointment in #44
 D ARSET^SDESAPTREQ44(.JSON,$G(ARUPD),$G(ARIEN),$G(DFN),$G(ARDAPTDT),$G(ARLEN),$G(ARRSN),$G(ARUSER),$G(ARODT),$G(PATELG),$G(AROVB))
 Q
ARCANCEL44(RETURN,SDDFN,SDCLNIEN,SDARDTTM) ; RPC: SDES CANCEL APPT #44
 D ARCANCEL44^SDESCANCELAPPT44(.RETURN,$G(SDDFN),$G(SDCLNIEN),$G(SDARDTTM)) Q
APTREQ2CRT(JSON,SDPATIENTDFN,SDCLNIEN,SDAPPTDTTM,SDLABDTTM,SDXRAYDTTM,SDEKGDTTM,SDVSTPURP,SDAPPTTYPE,SDCOLLATERAL,SDSCHREQTYPE,SDNXTAVAAPPT,SDFOLLOWUP) ; Create Appointment in #2
 N SDAPPTUPD
 S SDAPPTUPD=0
 D ARSET2
 Q
APTREQ2EDIT(JSON,SDPATIENTDFN,SDCLNIEN,SDAPPTDTTM,SDLABDTTM,SDXRAYDTTM,SDEKGDTTM,SDVSTPURP,SDAPPTTYPE,SDCOLLATERAL,SDSCHREQTYPE,SDNXTAVAAPPT,SDFOLLOWUP) ; Edit Appointment in #2
 N SDAPPTUPD
 S SDAPPTUPD=1
 D ARSET2
 Q
ARSET2 ; Create/Edit Appointment in #2
 D ARSET^SDESAPPTREQ2(.JSON,$G(SDAPPTUPD),$G(SDPATIENTDFN),$G(SDCLNIEN),$G(SDAPPTDTTM),$G(SDLABDTTM),$G(SDXRAYDTTM),$G(SDEKGDTTM),$G(SDVSTPURP),$G(SDAPPTTYPE),$G(SDCOLLATERAL),$G(SDSCHREQTYPE),$G(SDNXTAVAAPPT),$G(SDFOLLOWUP))
 Q
ARCANCEL2(RETURN,SDPATIENTDFN,SDCLNIEN,SDCANCELTYP,SDAPPTDTTM,SDCANCELDTTM,SDUSR,SDCANCELREASON,SDCANCELRMKS) ; RPC: SDES CANCEL APPT #2
 D ARCANCEL2^SDESCANCELAPPT2(.RETURN,$G(SDPATIENTDFN),$G(SDCLNIEN),$G(SDCANCELTYP),$G(SDAPPTDTTM),$G(SDCANCELDTTM),$G(SDUSR),$G(SDCANCELREASON),$G(SDCANCELRMKS)) Q
 ;
CANCELAPPT(SDECY,APPTIEN,STATUS,CANREAS,USER,EAS) ;SDES CANCEL APPT - cancel appointment
 D CANCELAPPT^SDESCANCELAPPT(.SDECY,$G(APPTIEN),$G(STATUS),$G(CANREAS),$G(USER),$G(EAS)) Q
 ;
CHECKIN(JSON,SDECAPTID,SDECCDT,SDECCC,SDECPRV) ;SDES APPT CHECKIN JSON
 D CHECKIN^SDES25(.JSON,$G(SDECAPTID),$G(SDECCDT),$G(SDECCC),$G(SDECPRV)) Q
 ;
 ;The parameter list for the clinic create and set use generic parameter names to ensure we stay in SAC compliance
 ;with the length of a single line.
CLINICCREATE(RET,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44) ;
 ;CLINICCREATE(RET,CLINIEN,R1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29) ;
 S CLINIEN=""  ;There will never be an IEN when calling this RPC
 D CLINICSET Q
CLINICSET  ;Called from CLINICCREATE and CLINICUPDATE tags
 S P1=$G(P1),P2=$G(P2),P3=$G(P3),P4=$G(P4),P5=$G(P5),P6=$G(P6),P7=$G(P7),P8=$G(P8),P9=$G(P9),P10=$G(P10),P11=$G(P11),P12=$G(P12),P13=$G(P13),P14=$G(P14),P15=$G(P15),P16=$G(P16),P17=$G(P17)
 S P18=$G(P18),P19=$G(P19),P20=$G(P20),P21=$G(P21),P22=$G(P22),P23=$G(P23)
 S P24=$G(P24),P25=$G(P25),P26=$G(P26),P27=$G(P27),P28=$G(P28),P29=$G(P29),P30=$G(P30),P31=$G(P31),P32=$G(P32),P33=$G(P33),P34=$G(P34),P35=$G(P35),P36=$G(P36),P37=$G(P37),P38=$G(P38),P39=$G(P39),P40=$G(P40)
 S P41=$G(P41),P42=$G(P42),P43=$G(P43),P44=$G(P44)
 D CLINICSET^SDESCLINICSET(.RET,CLINIEN,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44)
 Q
 ;
CLINICSEARCH(SDECY,SEARCHSTRING) ;Given a search string return a clinic list that matches.
 D CLINICSEARCH^SDESSEARCH(.SDECY,$G(SEARCHSTRING)) Q
CLINICRSCSEARCH(SDECY,SEARCHSTRING) ;Given a search string return a clinic list that matches.
 D CLINICRSC^SDES01C(.SDECY,$G(SEARCHSTRING)) Q
CREATEAPPTWRAPPR(JSONRETURN,APPTARRAY) ; SDES CREATE APPOINTMENTS ;Create appts in Files #409.84, #44, and #2.
 D CREATEAPPTS^SDESCRTAPPTWRAP(.JSONRETURN,.APPTARRAY) Q
GETREGA(SDECY,DFN,EAS) ;SDES GET REGISTRATION INFO
 D GETREGA^SDESGETREGA(.SDECY,$G(DFN),$G(EAS)) Q
INSURVERIFYREQ(JSON,DFN,EAS) ;SDES GET INSRUANCE VERIFY REQ
 D INSURVERIFYREQ^SDESPATRPC(.JSON,$G(DFN),$G(EAS)) Q
INSURINDICATORS(RETURN,DFNS) ;SDES GET INSURANCE VERIFY LIST
 D INSURINDICATORS^SDESPATRPC(.RETURN,.DFNS) Q
SPACEBAR(SDECY,SDECDIC,SDECVAL) ;EP Update ^DISV with most recent lookup value SDECVAL from file SDECDIC
 D SPACEBAR^SDES30(.SDECY,$G(SDECDIC),$G(SDECVAL)) Q
JSONINACTCLN(SDEC,CLINICIEN,EAS) ;EP RPC: SDES INACTIVATE CLINIC
 D JSONINACTCLN^SDESINACTCLINIC(.SDEC,$G(CLINICIEN),$G(EAS)) Q
JSONCLNINFO(SDEC,CLINICIEN,EAS) ;EP RPC: SDES GET CLINIC INFO
 D JSONCLNINFO^SDESRTVCLN(.SDEC,$G(CLINICIEN),$G(EAS)) Q
SETCLINAVAIL(RETURN,SDCLINIC,DATES,TIMES,SLOTS,SDEAS) ; RPC: SDES SET CLINIC AVAILABILITY
 D SETCLINAVAIL^SDESCLNSETAVAIL(.RETURN,$G(SDCLINIC),$G(DATES),$G(TIMES),$G(SLOTS),$G(SDEAS)) Q
GETCLNAVAILABLTY(RET,CLINICIEN,SDESSTART,SDESENDDATE,EAS) ;EP RPC: SDES GET CLINIC AVAILABILITY-retrieve clinic availablity in a given timeframe
 D GETCLAVAILABLTY^SDESCLINICAVAIL(.RET,$G(CLINICIEN),$G(SDESSTART),$G(SDESENDDATE),$G(EAS)) Q
CANCLNAVAILABLTY(RET,SDCLNIEN,SDESCANDATE,SDESSTRTIM,SDESENDTIM,SDCANREM,SDEAS) ;Called from RPC: SDES CANCEL CLINIC AVAILABILITY
 D CANCLAVAIL^SDESCCAVAIL(.RET,$G(SDCLNIEN),$G(SDESCANDATE),$G(SDESSTRTIM),$G(SDESENDTIM),$G(SDCANREM),$G(SDEAS)) Q
GETALLAPPTS(SDECY,DFN) ; SDES GET PATIENT APPTS BY DFN #2
 D GETALLAPPTS^SDESGETPATAPPT(.SDECY,$G(DFN)) Q
GETSINGLEAPPT(SDECY,DFN,DATETIME,CLINIC) ; SDES GET PATIENT APPT BY IEN #2
 D GETSINGLEAPPT^SDESGETPATAPPT(.SDECY,$G(DFN),$G(DATETIME),$G(CLINIC)) Q
GETUSRDTL(RET,SDSECID,EAS) ;Called from RPC: SDES GET USER PROFILE
 D GETUSRDTL^SDESGETUD(.RET,$G(SDSECID),$G(EAS)) Q
GETUSRDTLDUZ(RET,SDUSRIEN,EAS) ;Called from RPC: SDES GET USER PROFILE BY DUZ
 D GETUSRDTLDUZ^SDESGETUD(.RET,$G(SDUSRIEN),$G(EAS)) Q
UPDRECALLREQ(RETN,RECALLIEN,DFN,ACCNO,SDCMT,FASTING,APPTP,RRPROVIEN,CLINIEN,APPTLEN,DATE,RECPPDT,DAPTDT,USERIEN,SECPDT,EAS) ;update recall request
 D UPDRECALLREQ^SDESUPDRECREQ(.RETN,$G(RECALLIEN),$G(DFN),$G(ACCNO),$G(SDCMT),$G(FASTING),$G(APPTP),$G(RRPROVIEN),$G(CLINIEN),$G(APPTLEN),$G(DATE),$G(RECPPDT),$G(DAPTDT),$G(USERIEN),$G(SECPDT),$G(EAS)) Q
CREATERECREQ(RETN,DFN,ACCNO,SDCMT,FASTING,APPTP,RRPROVIEN,CLINIEN,APPTLEN,DATE,RECPPDT,DAPTDT,USERIEN,SECPDT,SDENTDT,EAS) ;update recall request
 D CREATERECREQ^SDESUPDRECREQ(.RETN,$G(DFN),$G(ACCNO),$G(SDCMT),$G(FASTING),$G(APPTP),$G(RRPROVIEN),$G(CLINIEN),$G(APPTLEN),$G(DATE),$G(RECPPDT),$G(DAPTDT),$G(USERIEN),$G(SECPDT),$G(SDENTDT),$G(EAS)) Q
DISPRECALL(SDECY,RECALLIEN,REASON,COMMENT,EAS) ; for a PtCSch request, set disposition reason and DELETE  an entry  from the RECALL REMINDERS file 403.5
 D DISPRECALL^SDESDISPRECALL(.SDECY,$G(RECALLIEN),$G(REASON),$G(COMMENT),$G(EAS)) Q
GETAPPOINTMENTS(SDECY,SDCLIN,SDSTDTTM,SDENDDTTM) ;get appointments for clinic out of file 44
 D GETAPPOINTMENTS^SDESGETCLINAPPT(.SDECY,$G(SDCLIN),$G(SDSTDTTM),$G(SDENDDTTM)) Q
GETSTOPCODE(SDECY,SDSTCD) ;get stop code details out of file 40.7
 D GETSTCDDTL^SDESGETSTOPCODE(.SDECY,$G(SDSTCD)) Q
GETPATCHNUM(SDECY) ; get latest SD patch number installed on system
 D GETPATCHNUM^SDESPATCHINFO(.SDECY) Q
GETMISSIONELG(SDECY,APPTREQIEN,PID,APPTREQTYP,SDEAS,APPTDATE,CLINIEN) ;
 D GETMISSIONELG^SDESMISSIONELG(.SDECY,$G(APPTREQIEN),$G(PID),$G(APPTREQTYP),$G(SDEAS),$G(APPTDATE),$G(CLINIEN)) Q
PRINTPATAPPTS(SDECY,SDDFN,SDBEGIN,SDEND,EAS) ;print patient friend appointments
 S:$G(SDBEGIN)'="" SDBEGIN=$$ISOTFM^SDAMUTDT(SDBEGIN)
 S:$G(SDEND)'="" SDEND=$$ISOTFM^SDAMUTDT(SDEND)
 S:$G(SDBEGIN)="" SDBEGIN=$$NOW^XLFDT
 S:$G(SDEND)="" SDEND=$$FMADD^XLFDT(SDBEGIN,90)
 D PRINTPATAPPTS^SDESPRINTPATAPPT(.SDECY,$G(SDDFN),$G(SDBEGIN),$G(SDEND),$G(EAS)) Q
 Q
 ;Based on Patient DFN, retrieve and return all appointments associated with a Patient IEN from SDEC APPOINTMENT File #409.84,
 ;HOSPITAL LOCATION File #44, and the Appointment Multiple Patient File #2
GETAPPTWRAPDFN(SDECY,SDDFN,SDBEGIN,SDEND)   ;Called from RPC: SDES GET APPTS BY PATIENT DFN
 N SDVIEWAPPTBY
 S SDVIEWAPPTBY=0
 D GETAPPTS^SDESGETAPPTWRAP(.SDECY,$G(SDDFN),$G(SDBEGIN),$G(SDEND))
 Q
 ;Based on CLINIC IEN, retrieve and return all appointments associated with a Clinic IEN from SDEC APPOINTMENT File #409.84,
 ;HOSPITAL LOCATION File #44, and the Appointment Multiple Patient File #2
GETAPPTWRAPCLIN(SDECY,SDCLINIEN,SDBEGIN,SDEND)  ;Called from RPC: SDES GET APPTS BY CLIN IEN
 N SDVIEWAPPTBY
 S SDVIEWAPPTBY=1
 D GETAPPTS^SDESGETAPPTWRAP(.SDECY,$G(SDCLINIEN),$G(SDBEGIN),$G(SDEND))
 Q
 ;Based on APPOINTMENT IEN, retrieve and return all appointments associated with Appointment IEN from SDEC APPOINTMENT File #409.84,
 ;HOSPITAL LOCATION File #44, and the Appointment Multiple Patient File #2
GETAPPTWRAPIEN(SDECY,SDAPPTIEN,SDEAS)  ;;Called from RPC: SDES GET APPTS BY IEN
 D GETAPPTBYIEN^SDESGETAPPTWRAP2(.SDECY,$G(SDAPPTIEN),$G(SDEAS))
 Q
 ;Based on Patient DFN, retrieve and return all appointments associated with a Patient IEN from SDEC APPOINTMENT File #409.84,
 ;HOSPITAL LOCATION File #44, and the Appointment Multiple Patient File #2
 ;This is a clone from SDES GET APPTS BY PATIENT DFN
GETAPPTWRAPDFN2(SDECY,SDDFN,SDBEGIN,SDEND,SDEAS)   ;Called from RPC: SDES GET APPTS BY PATIENT DFN2
 D GETAPPTBYPATDFN^SDESGETAPPTWRAP2(.SDECY,$G(SDDFN),$G(SDBEGIN),$G(SDEND),$G(SDEAS))
 Q
 ;Based on CLINIC IEN, retrieve and return all appointments associated with a Clinic IEN from SDEC APPOINTMENT File #409.84,
 ;HOSPITAL LOCATION File #44, and the Appointment Multiple Patient File #2
 ;This is a clone from SDES GET APPTS BY CLIN IEN
GETAPPTWRAPCLIN2(SDECY,SDCLINIEN,SDBEGIN,SDEND,SDEAS)  ;;Called from RPC: SDES GET APPTS BY CLIN IEN 2
 D GETAPPTBYCLNIEN^SDESGETAPPTWRAP2(.SDECY,$G(SDCLINIEN),$G(SDBEGIN),$G(SDEND),$G(SDEAS))
 Q
 ; get appointment request wrapper
GETREQLISTBYDFN(JSONRETURN,DFN,EAS) ; SDES GET APPT REQ LIST BY DFN
 D GETREQLISTBYDFN^SDESGETREQWRAPPR(.JSONRETURN,$G(DFN),$G(EAS)) Q
GETREQBYREQIEN(JSONRETURN,REQUESTIEN,EAS) ;SDES GET APPT REQ BY IEN
 D GETREQBYREQIEN^SDESGETAPPTREQ(.JSONRETURN,$G(REQUESTIEN),$G(EAS)) Q
GETREQSBYDFN(JSONRETURN,DFN,EAS) ;SDES PATIENT APPT REQ BY DFN
 D GETREQSBYDFN^SDESGETAPPTREQ(.JSONRETURN,$G(DFN),$G(EAS)) Q
GETCONSULTBYIEN(JSONRETURN,CONSULTIEN,EAS) ;SDES GET CONSULTS BY IEN
 D GETCONSULTBYIEN^SDESGETCONSULTS(.JSONRETURN,$G(CONSULTIEN),$G(EAS)) Q
GETCONSULTSBYDFN(JSONRETURN,DFN,EAS) ;SDES GET CONSULTS BY DFN
 D GETCONSULTSBYDFN^SDESGETCONSULTS(.JSONRETURN,$G(DFN),$G(EAS)) Q
GETRECALLBYIEN(JSONRETURN,RECALLIEN,EAS) ;SDES GET RECALLS BY IEN
 D GETRECALLBYIEN^SDESGETRECALL(.JSONRETURN,$G(RECALLIEN),$G(EAS)) Q
GETRECALLSBYDFN(JSONRETURN,DFN,EAS) ; SDES GET RECALLS BY DFN
 D GETRECALLSBYDFN^SDESGETRECALL(.JSONRETURN,$G(DFN),$G(EAS)) Q
 ;GETREQBYAPPTIEN(JSONRETURN,APPTIEN,EAS) ;SDES GET APPT REQ BY APPT IEN
 ;D GETREQBYAPPTIEN^SDESGETAPPTREQ(.JSONRETURN,$G(APPTIEN),$G(EAS)) Q ;
 ;
CANCELAPPTS(JSONRETURN,APPTIEN,CLINICIEN,DFN,CANBYCLINORPAT,CANCELREASONIEN,NOTE,CANCELHASH,EAS) ;
 D CANCELAPPTS^SDESCANCELAPPTS(.JSONRETURN,$G(APPTIEN),$G(CLINICIEN),$G(DFN),$G(CANBYCLINORPAT),$G(CANCELREASONIEN),$G(NOTE),$G(CANCELHASH),$G(EAS)) ;
 Q
 ;
ADDUSR(JSONRETURN,LOCIEN,USRIEN) ;ADD PRIV USER
 D UPDPRIV^SDESLOC(.JSONRETURN,1,$G(LOCIEN),$G(USRIEN)) Q
RMVUSR(JSONRETURN,LOCIEN,USRIEN) ; DELETE PRIV USER
 D UPDPRIV^SDESLOC(.JSONRETURN,0,$G(LOCIEN),$G(USRIEN)) Q
RMVAUSR(JSONRETURN,LOCIEN) ; DELETE ALL USERS FROM #44
 D RMVALLUSR^SDESLOC(.JSONRETURN,$G(LOCIEN)) Q
RTNAUSR(JSONRETURN,LOCIEN) ; READ ALL USERS FROM #44
 D RTNALLUSR^SDESLOC(.JSONRETURN,$G(LOCIEN)) Q
 ;