SDES2 GET APPTS BY APPT IENS (5014)    REMOTE PROCEDURE (8994)

Name Value
NAME SDES2 GET APPTS BY APPT IENS
TAG APPTSBYIENLIST
ROUTINE SDES2GETAPPTRPCS
RETURN VALUE TYPE ARRAY
AVAILABILITY RESTRICTED
APP PROXY ALLOWED Yes
DESCRIPTION
This RPC will take in a list of up to 50 appointment IENS values and 
returns an appointment object for each given appointment IEN.
 
Can only be invoked by Acheron
INPUT PARAMETER
  • SDCONTEXT
    PARAMETER TYPE:   LIST
    MAXIMUM DATA LENGTH:   32000
    REQUIRED:   YES
    SEQUENCE NUMBER:   1
    DESCRIPTION:   
    SDCONTEXT("ACHERON AUDIT ID") = Up to 40 Character unique ID number.
                              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 SECID of the user taking action in the
                              calling application.
    SDCONTEXT("PATIENT DFN")= The name of the patient taking action on the
                              calling application.
    SDCONTEXT("PATIENT ICN")= The ICN of the patient taking action on the
    
  • SDPARAM
    PARAMETER TYPE:   LIST
    MAXIMUM DATA LENGTH:   32000
    REQUIRED:   YES
    SEQUENCE NUMBER:   2
    DESCRIPTION:   
    SDPARAM("APPOINTMENT IEN",ien)=""
    *where ien is the appointment ien
    
RETURN PARAMETER DESCRIPTION
Example one: Cancelled appointment
   "AppointmentTypeSubCategory": "",
    "CurrentEligibilityCode": "COLLATERAL OF VET.",
    "DFN": 7204597,
    "DateOfBirth": "1950-01-03",
    "DateOfBirthInternal": 2500103,
    "DateOfDeath": "",
    "DemographicsNeedUpdate": 1,
    "Eligibility": "COLLATERAL OF VET.",
    "EligibilityIEN": 12,
    "EligibilityOfVisit": "COLLATERAL OF VET.",
    "EnrollmentCode": "",
   "AutoRebookedApptDateTime": "",
    "EnrollmentDate": "",
    "FugitiveFelonFlag": "NO",
    "Gender": "FEMALE",
    "ICN": "4420062581V571742",
    "LastRegistrationDate": "2010-11-02T10:24:13-0400",
    "LocalFlag": [
     ""
    ],
    "Name": "SQA,REQUEST",
    "NationalFlag": [
   "CancelDateTime": "2023-12-06T14:17:06-0500",
     ""
    ],
    "NeedInsuranceVerification": 1,
    "OriginalRegistrationDate": "2010-09-28T15:04:37-0400",
    "SSN": 7667,
    "SensitivePatientRestrictedRecord": 0,
    "SensitivePatientType": 0,
    "Street": "GENERAL DELIVERY",
    "cellularPhone": "",
    "residentialPhone": ""
   "CancellationReason": "PANDEMIC",
   },
   "PatientComments": [
    ""
   ],
   "PriorXRayResults": "",
   "Provider": {
    "ID": 1824,
    "Name": "CERVANTES,DEWAYNE J",
    "SecId": 1034217513
   },
   "CancellationRemarks": "",
   "PurposeOfVisit": "SCHEDULED VISIT",
   "RealAppointment": 0,
   "RequestIEN": 263452,
   "RequestType": "APPT",
   "Resource": {
    "ClinicIEN": 2147,
    "Name": "CHY CARDIOLOGY"
   },
   "ResourceIEN": 1058,
   "RoutingSlipPrintDate": "",
   "CancelledByUser": {
   "RoutingSlipPrinted": "",
   "SchedulerName": "",
   "SchedulingApplication": "",
   "SchedulingRequestType": "MULTIPLE APPT. BOOKING",
   "SpecialSurveyDisposition": "",
   "StartTimeFM": 3231206.08,
   "Status": "CANCELLED BY CLINIC",
   "StatusCancelDateTime": "2023-12-06T14:17:06-0500",
   "VVSApptID": "",
   "VeteranVideoCallURL": "",
    "ID": 520881841,
   "Walkin": "",
   "WardLocation": "",
   "XRAY": "",
   "XrayDateTime": ""
  }
 ]
}
Example two with check-in steps:
{
 "Appointment": [
    "Name": "CALIS,NEDIME",
  {
   "AppointmentCancelled": "",
   "AppointmentDateTime": "2022-11-14T10:00-0500",
   "AppointmentIEN": 294806,
   "AppointmentType": "REGULAR",
   "AppointmentTypeIEN": 9,
   "AppointmentTypeSubCategory": "",
   "AutoRebookedApptDateTime": "",
   "CancelDateTime": "",
   "CancellationReason": "",
    "SecId": 20010011913859
   "CancellationRemarks": "",
   "CancelledByUser": [
    ""
   ],
   "CheckIn": "2022-11-14T14:21:41-0500",
   "CheckInEntered": "2022-11-14T14:21:41-0500",
   "CheckInSteps": [
    {
     "DateTime": "2022-11-14T14:16:28-0500",
     "IEN": 1,
   },
     "Status": "PRE-CHECK-IN STARTED"
    },
    {
     "DateTime": "2022-11-14T14:16:53-0500",
     "IEN": 2,
     "Status": "PRE-CHECK-IN COMPLETE"
    },
    {
     "DateTime": "2022-11-14T14:19:38-0500",
     "IEN": 3,
{
   "CheckIn": "",
     "Status": "CHECK-IN STARTED"
    },
    {
     "DateTime": "2022-11-14T14:21:02-0500",
     "IEN": 4,
     "Status": "CHECK-IN COMPLETE"
    },
    {
     "DateTime": "2022-11-14T14:21:22-0500",
     "IEN": 5,
   "CheckInEntered": "",
     "Status": "E-CHECK-IN STARTED"
    },
    {
     "DateTime": "2022-11-14T14:21:41-0500",
     "IEN": 6,
     "Status": "E-CHECK-IN COMPLETE"
    }
   ],
   "CheckInUser": "TEST,USER",
   "CheckOut": "2022-11-14T14:22-0500",
   "CheckInSteps": [
   "CheckOutEntered": "2022-11-14T14:23:19-0500",
   "CheckOutUser": "TEST,CHECKINUSER",
   "Clinic": {
    "ClinicIEN": 3753,
    "CreditStopCodeAMIS": 179,
    "CreditStopCodeName": "RT CLIN VID CARE HOME",
    "DisplayClinicAppt": "YES",
    "Division": "CHEYENNE VAMROC",
    "ECheckinAllowed": "YES",
    "IsOverbook": 1,
    ""
    "Name": "CHY ACUTE CARE 1",
    "NonCountClinic":1,
    "PatientFriendlyName": "CHY ACUTE CARE THOMPSON",
    "PbspID": 234,
    "PhysicalLocation": "ARROWHEAD BLDG LOBBY",
    "PreCheckinAllowed": "YES",
    "ProhibitedClinic": 1,
    "StationNumber": 442,
    "StopCodeAMIS": 323,
    "StopCodeName": "PRIMARY CARE/MEDICINE",
   ],
    "Telephone": "(307)778-7550",
    "TelephoneExtension": 1234,
    "TimeZone": "EASTERN",
    "TimeZoneDetails": [
     {
      "Offset": "-0500",
      "TimeFrame": "STANDARD",
      "TimeZoneCode": "EST"
     },
     {
   "CheckInUser": "",
      "Offset": "-0400",
      "TimeFrame": "DAYLIGHT SAVINGS",
      "TimeZoneCode": "EDT"
     }
    ],
    "TimeZoneException": "",
    "VeteranSelfCancel": "NO"
   },
   "CollateralVisit": "",
   "ConsultLink": "",
   "CheckOut": "",
   "CurrentStatus": "ACT REQ/CHECKED OUT",
   "DataEntryClerk": "CALIS,NEDIME",
   "DateAppointmentMade": "2022-11-14",
   "DesiredDateOfAppointment": "2022-11-14",
   "DuplicateApptSameDay": "",
   "EASTrackingNumber": "",
   "EkgDateTime": "",
   "EncounterConversionStatus": "",
   "EncounterFormsAsAddOns": "",
   "EncounterFormsPrinted": "",
   "CheckOutEntered": "",
   "EndTime": "2022-11-14T10:30-0500",
   "FollowUpVisit": "YES",
   "InpatientFlag": 1,
   "LabDateTime": "",
   "LengthOfAppt": 30,
   "MRTCFlag": 0,
   "NextAvaApptIndicator": "'NEXT AVA.' APPT. INDICATED BY USER",
   "NoShowCancelDateTime": "",
   "NoShowCancelledBy": "",
   "Note": "",
   "CheckOutUser": "",
   "NoteAuditing": [
    ""
   ],
   "NumberOfCollateralSeen": "",
   "OriginatingRequestType": "APPT",
   "OtherTests": "",
   "OtherTravel": "  ",
   "OutpatientEncounter": "2022-11-14T10:00-0500",
   "OverLaidAppointmentData": "NO",
   "OverbookFlag": "O",
   "Clinic": {
   "ParentRecordRequest": "",
   "Patient": {
    "CurrentEligibilityCode": "HUMANITARIAN EMERGENCY",
    "DFN": 7242584,
    "DateOfBirth": "1980-10-20",
    "DateOfBirthInternal": 2801020,
    "DateOfDeath": "",
    "DemographicsNeedUpdate": 1,
    "Eligibility": "HUMANITARIAN EMERGENCY",
    "EligibilityIEN": 8,
 "Appointment": [
    "ClinicIEN": 2147,
    "EligibilityOfVisit": "HUMANITARIAN EMERGENCY",
    "EnrollmentCode": "",
    "EnrollmentDate": "",
    "FugitiveFelonFlag": "NO",
    "Gender": "MALE",
    "ICN": "4420062425V751830",
    "LastRegistrationDate": "2024-08-16T11:36:43-0400",
    "LocalFlag": [
     ""
    ],
    "CreditStopCodeAMIS": 179,
    "Name": "INPATIENT,IRAONE",
    "NationalFlag": [
     ""
    ],
    "NeedInsuranceVerification": 1,
    "OriginalRegistrationDate": "2022-11-14T13:54:20-0500",
    "SSN": "0925",
    "SensitivePatientRestrictedRecord": 0,
    "SensitivePatientType": 0,
    "Street": "2345 STATE ST.",
    "CreditStopCodeName": "RT CLIN VID CARE HOME",
    "cellularPhone": "",
    "residentialPhone": "(312) 897-2345"
   },
   "PatientComments": [
    ""
   ],
   "PriorXRayResults": "",
   "Provider": {
    "ID": 520664036,
    "Name": "TEST,PROVIDER",
    "DisplayClinicAppt": "YES",
    "SecId": ""
   },
   "PurposeOfVisit": "SCHEDULED VISIT",
   "RealAppointment": 0,
   "RequestIEN": 257996,
   "RequestType": "APPT",
   "Resource": {
    "ClinicIEN": 3753,
    "Name": "CHY ACUTE CARE 1"
   },
    "Division": "CHEYENNE VAMROC",
   "ResourceIEN": 2062,
   "RoutingSlipPrintDate": "",
   "RoutingSlipPrinted": "",
   "SchedulerName": "",
   "SchedulingApplication": "",
   "SchedulingRequestType": "'NEXT AVAILABLE' APPT.",
   "SpecialSurveyDisposition": "",
   "StartTimeFM": 3221114.1,
   "Status": "ACT REQ/CHECKED OUT",
   "StatusCancelDateTime": "",
    "ECheckinAllowed": "YES",
   "VVSApptID": "",
   "VeteranVideoCallURL": "",
   "Walkin": "",
   "WardLocation": "",
   "XRAY": "",
   "XrayDateTime": ""
  }
 ]
}
      "Narrative": [
    "IsOverbook": 0,
       "This is a test account.  The actual record text was removed Feb 
14, 2018."
      ],
      "OriginatingSiteID": 629,
      "OriginatingSiteName": "SE LOUISIANA VETERANS HCS",
      "OwnerSiteID": 671,
      "OwnerSiteName": "AUDIE L. MURPHY MEMORIAL HOSP",
      "ReviewDate": "",
      "Type": "BEHAVIORAL"
     }
    "Name": "CHY CARDIOLOGY",
    ],
    "NeedInsuranceVerification": 1,
    "OriginalRegistrationDate": "2022-09-26T16:23:58-0400",
    "SSN": "2751P",
    "SensitivePatientRestrictedRecord": 1,
    "SensitivePatientType": 1,
    "Street": "10000 MAIN"
   },
     "PatientComments": [
      ""
    "NonCountClinic":1,
     ],
     "PriorXRayResults": "",
     "Provider": {
      "ID": 520664036,
      "Name": "TEST,GREGORIO D",
      "SecId": ""
     },
     "PurposeOfVisit": "SCHEDULED VISIT",
     "RealAppointment": 0,
     "RequestIEN": 257996,
    "PatientFriendlyName": "CHY CARDIOLOGY",
     "RequestType": "APPT",
     "Resource": {
      "ClinicIEN": 3753,
      "Name": "CHY ACUTE CARE 1"
     },
     "ResourceIEN": 2062,
     "RoutingSlipPrintDate": "",
     "RoutingSlipPrinted": "",
     "SchedulerName": "",
     "SchedulingApplication": "",
  {
    "PbspID": 73737379999777777,
     "SchedulingRequestType": "'NEXT AVAILABLE' APPT.",
     "SpecialSurveyDisposition": "",
     "StartTimeFM": 3221114.1,
     "Status": "INPATIENT/ACT REQ",
     "StatusCancelDateTime": "",
     "VVSApptID": "",
     "VeteranVideoCallURL": "",
     "Walkin": "",
     "WardLocation": "",
     "XRAY": "",
    "PhysicalLocation": "ARROWHEAD BLD A1-16 OR 17",
     "XrayDateTime": ""
    }
   ]
  }
    "PreCheckinAllowed": "YES",
    "ProhibitedClinic": 1,
    "StationNumber": 442,
    "StopCodeAMIS": 108,
    "StopCodeName": "LABORATORY",
    "Telephone": "(307)778-7550",
    "TelephoneExtension": 1234,
    "TimeZone": "EASTERN",
   "AppointmentCancelled": "CANCELLED",
    "TimeZoneDetails": [
     {
      "Offset": "-0500",
      "TimeFrame": "STANDARD",
      "TimeZoneCode": "EST"
     },
     {
      "Offset": "-0400",
      "TimeFrame": "DAYLIGHT SAVINGS",
      "TimeZoneCode": "EDT"
   "AppointmentDateTime": "2023-12-06T08:00-0500",
     }
    ],
    "TimeZoneException": "",
    "VeteranSelfCancel": "NO"
   },
   "CollateralVisit": "",
   "ConsultLink": "",
   "CurrentStatus": "CANCELLED BY CLINIC",
   "DataEntryClerk": "CALIS,NEDIME",
   "DateAppointmentMade": "2023-12-06",
   "AppointmentIEN": 298114,
   "DesiredDateOfAppointment": "2023-12-06",
   "DuplicateApptSameDay": "",
   "EASTrackingNumber": "",
   "EkgDateTime": "",
   "EncounterConversionStatus": "",
   "EncounterFormsAsAddOns": "",
   "EncounterFormsPrinted": "",
   "EndTime": "2023-12-06T08:30-0500",
   "FollowUpVisit": "NO",
   "InpatientFlag": 0,
   "AppointmentType": "REGULAR",
   "LabDateTime": "",
   "LengthOfAppt": 30,
   "MRTCFlag": 1,
   "NextAvaApptIndicator": "'NEXT AVA.' APPT. INDICATED BY USER & 
CALCULATION",
   "NoShowCancelDateTime": "2023-12-06T14:17:06-0500",
   "NoShowCancelledBy": "TEST,USER",
   "Note": "",
   "NoteAuditing": [
    ""
   "AppointmentTypeIEN": 9,
   ],
   "NumberOfCollateralSeen": "",
   "OriginatingRequestType": "APPT",
   "OtherTests": "",
   "OtherTravel": "  ",
   "OutpatientEncounter": "",
   "OverLaidAppointmentData": "NO",
   "OverbookFlag": "",
   "ParentRecordRequest": "",
   "Patient": {