SDES2 CANCEL APPOINTMENT 2 (5202)    REMOTE PROCEDURE (8994)

Name Value
NAME SDES2 CANCEL APPOINTMENT 2
TAG CANCELAPPT
ROUTINE SDES2CANCELAPPT2
RETURN VALUE TYPE ARRAY
AVAILABILITY RESTRICTED
INACTIVE ACTIVE
CLIENT MANAGER YES
APP PROXY ALLOWED Yes
DESCRIPTION
This RPC will cancel an appointment from the SDEC APPOINTMENT (#409.84)
  file, the PATIENT (#2) file, and the HOSPITAL LOCATION (#44) file.
  
 Can only be invoked by Acheron
INPUT PARAMETER
  • SDCONTEXT
    PARAMETER TYPE:   LIST
    REQUIRED:   YES
    SEQUENCE NUMBER:   1
    DESCRIPTION:   
        SDCONTEXT("ACHERON AUDIT ID") = 40 character unique ID number.
                                   on the calling application.
                                      Ex: 11d9dcc6-c6a2-4785-8031-8261576fca37
        SDCONTEXT("USER DUZ") = The DUZ of the user taking action on the 
                                calling application.
        SDCONTEXT("USER SECID") = The Security ID of the user taking action on
                                  the calling application.
        SDCONTEXT("PATIENT DFN") = The DFN of the Veteran/user taking action
                                   on the calling application.
        SDCONTEXT("PATIENT ICN") = The ICN of the Veteran/user taking action 
    
  • PARAMS
    PARAMETER TYPE:   LIST
    REQUIRED:   YES
    SEQUENCE NUMBER:   2
    DESCRIPTION:   
        PARAMS("APPT IEN") - IEN of SDEC APPOINTMENT (#409.84) file record
     OPTIONAL PARAMETERS:
        PARAMS("NOTE") - Comments related to the cancellation
        PARAMS("CANCEL HASH") - List of cancellation comment hash tags
        PARAMS("NEW PID") - New/edited PID passed in when cancelling an 
                            appointment by patient
                             to be cancelled (req)
        PARAMS("CLINIC IEN") - Pointer to the HOSPITAL LOCATION (#44) file
        PARAMS("DFN") - Pointer to the PATIENT (#2) file
        PARAMS("CANCELLED BY") - Appt Cancelled By: "C" - Cancelled By Clinic,
                                 "PC" - Cancelled By Patient
        PARAMS("CANCEL REASON") - Cancellation Reason Name in the CANCELLATION
                                  REASON (#409.2) file
     
    
RETURN PARAMETER DESCRIPTION
{
         "AutoRebookedApptDateTime":"",
         "OutpatientEncounter":"",
         "OverLaidAppointmentData":"NO",
         "OverbookFlag":"",
         "ParentRecordRequest":"",
         "Patient":{
            "CurrentEligibilityCode":"",
            "DFN":7242680,
            "DateOfBirth":"1666-01-32",
            "DateOfBirthInternal":2660132,
            "DateOfDeath":"",
         "CancelDateTime":"2026-04-24T14:47:28-0400",
            "DemographicsNeedUpdate":1,
            "Eligibility":"",
            "EligibilityIEN":"",
            "EligibilityOfVisit":"AID & ATTENDANCE",
            "EnrollmentCode":"",
            "EnrollmentDate":"",
            "FugitiveFelonFlag":"NO",
            "Gender":"FEMALE",
            "ICN":"4420062650V799525",
            "LastRegistrationDate":"",
         "CancellationReason":"OTHER",
            "LocalFlag":[
               ""
            ],
            "Name":"TEST,BAYES M",
            "NationalFlag":[
               ""
            ],
            "NeedInsuranceVerification":1,
            "OriginalRegistrationDate":"",
            "PreferredName":"",
         "CancellationRemarks":"",
            "SSN":6666,
            "SensitivePatientRestrictedRecord":0,
            "SensitivePatientType":0,
            "Street":"3663 RIDGE RD",
            "cellularPhone":"",
            "residentialPhone":9375624897
         },
         "PatientComments":[
            ""
         ],
         "CancelledByUser":{
         "PriorXRayResults":"",
         "Provider":{
            "ID":520881805,
            "Name":"BUTLER,TEST L",
            "SecId":1046169286
         },
         "PurposeOfVisit":"C&P",
         "RealAppointment":0,
         "RequestIEN":267816,
         "RequestType":"APPT",
            "ID":520881949,
         "Resource":{
            "ClinicIEN":5967,
            "Name":"TEST MEGANB"
         },
         "ResourceIEN":4396,
         "RoutingSlipPrintDate":"",
         "RoutingSlipPrinted":"",
         "SchedulerName":"",
         "SchedulingApplication":"",
         "SchedulingRequestType":"'NEXT AVAILABLE' APPT.",
            "Name":"BAYES,TEST C",
         "SpecialSurveyDisposition":"",
         "StartTimeFM":3260424.15,
         "Status":"CANCELLED BY PATIENT",
         "StatusCancelDateTime":"2026-04-24T14:47:28-0400",
         "VVSApptID":"",
         "VeteranVideoCallURL":"",
         "Walkin":"NO",
         "WardLocation":"",
         "XRAY":"",
         "XrayDateTime":"2026-11-09T09:00-0500"
            "SecId":1076997052
      }
   ],
   "CompensationPensionCancel":[
      {
         "Text":"Appointment Apr 24, 2026@15:00 was not linked to a 2507 
request or was manually rebooked and linked to another appointment."
      },
      {
         "Text":"If the appointment was manually rebooked, you do not 
want to auto-rebook."
         },
      },
      {
         "Text":"If the appointment was not properly linked, it will need 
to be linked with the AMIE\/C&P appointment link management option."
      }
   ]
}
 
General Error Return Object:
{
         "CheckIn":"",
   "Appointment":[
      "],""CompensationPensionCancel"":["
   ],
   "Error":[
      "Missing Appointment ID."
   ]
}
   "Appointment":[
         "CheckInEntered":"",
         "CheckInSteps":[
            ""
         ],
         "CheckInUser":"",
         "CheckOut":"",
         "CheckOutEntered":"",
         "CheckOutUser":"",
         "Clinic":{
            "ClinicIEN":5967,
      {
            "CreditStopCodeAMIS":"",
            "CreditStopCodeName":"",
            "DisplayClinicAppt":"YES",
            "Division":"CHEYENNE VAMROC",
            "ECheckinAllowed":"YES",
            "IsOverbook":0,
            "Name":"TEST MEGANB",
            "NonCountClinic":1,
            "PatientFriendlyName":"TEST MEGANB",
            "PbspID":"",
         "AppointmentCancelled":"CANCELLED",
            "PhysicalLocation":"PHYSLOC",
            "PreCheckinAllowed":"YES",
            "ProhibitedClinic":0,
            "StationNumber":442,
            "StopCodeAMIS":120,
            "StopCodeName":"HEALTH SCREENING",
            "Telephone":"888-123-9124",
            "TelephoneExtension":230,
            "TimeZone":"EASTERN",
            "TimeZoneDetails":[
         "AppointmentDateTime":"2026-04-24T15:00-0400",
               {
                  "Offset":"-0500",
                  "TimeFrame":"STANDARD",
                  "TimeZoneCode":"EST"
               },
               {
                  "Offset":"-0400",
                  "TimeFrame":"DAYLIGHT SAVINGS",
                  "TimeZoneCode":"EDT"
               }
         "AppointmentIEN":301886,
            ],
            "TimeZoneException":"",
            "VeteranSelfCancel":"YES"
         },
         "CollateralVisit":"YES",
         "ConsultLink":"",
         "CurrentStatus":"CANCELLED BY PATIENT",
         "DataEntryClerk":"BAYES,MTEST C",
         "DateAppointmentMade":"2026-04-24T13:36:26-0400",
         "DesiredDateOfAppointment":"2026-04-23",
         "AppointmentType":"COMPENSATION & PENSION",
         "DuplicateApptSameDay":"",
         "EASTrackingNumber":"VSE-11420 TEST",
         "EkgDateTime":"2026-11-09T09:00-0500",
         "EncounterConversionStatus":"",
         "EncounterFormsAsAddOns":"",
         "EncounterFormsPrinted":"",
         "EndTime":"2026-04-24T15:30-0400",
         "FollowUpVisit":"YES",
         "InpatientFlag":0,
         "LabDateTime":"2026-11-09T09:00-0500",
         "AppointmentTypeIEN":1,
         "LengthOfAppt":30,
         "MRTCFlag":0,
         "NextAvaApptIndicator":"'NEXT AVA.' APPT. INDICATED BY USER",
         "NoShowCancelDateTime":"2026-04-24T14:47:28-0400",
         "NoShowCancelledBy":"BAYES,TEST C",
         "Note":[
            "CHILD 1 NOTE"
         ],
         "NoteAuditing":[
            {
         "AppointmentTypeSubCategory":"",
               "DateNoteAdded":"2026-04-24T13:36:26-0400",
               "Note":"CHILD 1 NOTE",
               "NoteAddedByDUZ":520881949,
               "NoteAddedByName":"BAYES,MTEST C"
            }
         ],
         "NumberOfCollateralSeen":"",
         "OriginatingRequestType":"APPT",
         "OtherTests":"TEST",
         "OtherTravel":"TEST",