SDES2 GET APPTS BY CLN RES IEN (5022)    REMOTE PROCEDURE (8994)

Name Value
NAME SDES2 GET APPTS BY CLN RES IEN
TAG BYCLINRESOURCE
ROUTINE SDES2GETAPPTRPCS
RETURN VALUE TYPE ARRAY
AVAILABILITY RESTRICTED
APP PROXY ALLOWED Yes
DESCRIPTION
This RPC will return back the appointment for a given clinic resource for 
a given time range.
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("ResourceIEN")
     SDPARAM("BeginDateTime")
     SDPARAM("EndDateTime")
    
RETURN PARAMETER DESCRIPTION
 Example one: Cancelled appointment
     "AppointmentTypeSubCategory": "",
     "OverLaidAppointmentData": "NO",
     "OverbookFlag": "",
     "ParentRecordRequest": "",
     "Patient": {
    "CurrentEligibilityCode": "SERVICE CONNECTED 50% to 100%",
    "DFN": 7209450,
    "DateOfBirth": "1990-06-06",
    "DateOfBirthInternal": 2900606,
    "DateOfDeath": "",
    "DemographicsNeedUpdate": 1,
     "AutoRebookedApptDateTime": "",
    "Eligibility": "SERVICE CONNECTED 50% to 100%",
    "EligibilityIEN": 1,
    "EligibilityOfVisit": "SERVICE CONNECTED 50% to 100%",
    "EnrollmentCode": "",
    "EnrollmentDate": "",
    "FugitiveFelonFlag": "NO",
    "Gender": "MALE",
    "ICN": "4420062499V538982",
    "LastRegistrationDate": "2023-09-01T15:13:57-0400",
    "LocalFlag": [
     "CancelDateTime": "2023-12-06T14:17:06-0500",
     {
      "AssignedDate": "2014-12-03T14:50:22-0500",
      "Category": "II (LOCAL)",
      "Name": "AT RISK PATIENT",
      "Narrative": [
       "This is a test account.  The actual record text was removed Feb 
14, 2018.",
       
"ABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLM
N",
     "CancellationReason": "PANDEMIC",
       "OPQRSTABCDEFGHIJKLMNOPQRST",
       
"ABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLM
N",
       "OPQRSTABCDEFGHIJKLMNOPQRST",
       
"ABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLM
N",
       "OPQRSTABCDEFGHIJKLMNOPQRST",
       
     "CancellationRemarks": "",
"ABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLM
N",
       "OPQRSTABCDEFGHIJKLMNOPQRST",
       
"ABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLM
N",
       "OPQRSTABCDEFGHIJKLMNOPQRST",
       " ",
       "END OF TEXT"
      ],
     "CancelledByUser": {
      "OriginatingSiteID": 442,
      "OriginatingSiteName": "CHEYENNE VA MEDICAL",
      "OwnerSiteID": 442,
      "OwnerSiteName": "CHEYENNE VA MEDICAL",
      "ReviewDate": "2023-12-13",
      "Type": "OTHER"
     }
    ],
    "Name": "VSE,LOCAL FLAG",
    "NationalFlag": [
      "ID": 520881841,
     ""
    ],
    "NeedInsuranceVerification": 1,
    "OriginalRegistrationDate": "2011-03-22T10:49:09-0400",
    "SSN": "0690P",
    "SensitivePatientRestrictedRecord": 0,
    "SensitivePatientType": 0,
    "Street": "C/O P MAI (136B)"
   },
     "PatientComments": [
      "Name": "TEST,USR",
      ""
     ],
     "PriorXRayResults": "",
     "Provider": {
      "ID": 1824,
      "Name": "PROVIDER,TEST J",
      "SecId": 1034217513
     },
     "PurposeOfVisit": "SCHEDULED VISIT",
     "RealAppointment": 0,
      "SecId": 1060245260
     "RequestIEN": 263452,
     "RequestType": "APPT",
     "Resource": {
      "ClinicIEN": 2147,
      "Name": "CHY CARDIOLOGY"
     },
     "ResourceIEN": 1058,
     "RoutingSlipPrintDate": "",
     "RoutingSlipPrinted": "",
     "SchedulerName": "",
     },
     "SchedulingApplication": "",
     "SchedulingRequestType": "MULTIPLE APPT. BOOKING",
     "SpecialSurveyDisposition": "",
     "StartTimeFM": 3231206.08,
     "Status": "CANCELLED BY CLINIC",
     "StatusCancelDateTime": "2023-12-06T14:17:06-0500",
     "VVSApptID": "",
     "VeteranVideoCallURL": "",
     "Walkin": "",
     "WardLocation": "",
  {
     "CheckIn": "",
     "XRAY": "",
     "XrayDateTime": ""
    }
   ]
  }
  Example two with check-in steps:
  {
   "Appointment": [
    {
     "AppointmentCancelled": "",
     "CheckInEntered": "",
     "AppointmentDateTime": "2022-11-14T10:00-0500",
     "AppointmentIEN": 294806,
     "AppointmentType": "REGULAR",
     "AppointmentTypeIEN": 9,
     "AppointmentTypeSubCategory": "",
     "AutoRebookedApptDateTime": "",
     "CancelDateTime": "",
     "CancellationReason": "",
     "CancellationRemarks": "",
     "CancelledByUser": [
     "CheckInSteps": [
      ""
     ],
     "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,
       "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,
       "Status": "E-CHECK-IN STARTED"
     "CheckInUser": "",
      },
      {
       "DateTime": "2022-11-14T14:21:41-0500",
       "IEN": 6,
       "Status": "E-CHECK-IN COMPLETE"
      }
     ],
     "CheckInUser": "TEST,NEDIME",
     "CheckOut": "2022-11-14T14:22-0500",
     "CheckOutEntered": "2022-11-14T14:23:19-0500",
     "CheckOut": "",
     "CheckOutUser": "TEST,FELIX JR",
     "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",
     "CheckOutEntered": "",
      "PatientFriendlyName": "CHY ACUTE CARE THOMPSON",
      "PbspID": "RANDY TEST PBSP",
      "PhysicalLocation": "ARROWHEAD BLDG LOBBY",
      "PreCheckinAllowed": "YES",
      "ProhibitedClinic": 0,
      "StationNumber": 442,
      "StopCodeAMIS": 323,
      "StopCodeName": "PRIMARY CARE/MEDICINE",
      "Telephone": "(307)778-7550",
      "TelephoneExtension": 1234,
     "CheckOutUser": "",
      "TimeZone": "EASTERN",
      "TimeZoneDetails": [
       {
        "Offset": "-0500",
        "TimeFrame": "STANDARD",
        "TimeZoneCode": "EST"
       },
       {
        "Offset": "-0400",
        "TimeFrame": "DAYLIGHT SAVINGS",
     "Clinic": {
        "TimeZoneCode": "EDT"
       }
      ],
      "TimeZoneException": "",
      "VeteranSelfCancel": "NO"
     },
     "CollateralVisit": "",
     "ConsultLink": "",
     "CurrentStatus": "INPATIENT/ACT REQ",
     "DataEntryClerk": "CALIS,NEDIME",
   "Appointment": [
      "ClinicIEN": 2147,
     "DateAppointmentMade": "2022-11-14T13:34:28-0500",
     "DesiredDateOfAppointment": "2022-11-14",
     "DuplicateApptSameDay": "",
     "EASTrackingNumber": "",
     "EkgDateTime": "",
     "EncounterConversionStatus": "",
     "EncounterFormsAsAddOns": "",
     "EncounterFormsPrinted": "",
     "EndTime": "2022-11-14T10:30-0500",
     "FollowUpVisit": "YES",
      "CreditStopCodeAMIS": 179,
     "InpatientFlag": 1,
     "LabDateTime": "",
     "LengthOfAppt": 30,
     "MRTCFlag": 1,
     "NextAvaApptIndicator": "'NEXT AVA.' APPT. INDICATED BY USER",
     "NoShowCancelDateTime": "",
     "NoShowCancelledBy": "",
     "Note": "TEST NOTE",
     "NoteAuditing": [
      {
      "CreditStopCodeName": "RT CLIN VID CARE HOME",
       "DateNoteAdded": "2024-10-16",
       "Note": "TEST NOTE",
       "NoteAddedByDUZ": 123456789,
       "NoteAddedByName": "TEST,USER ONE" 
      },
     ],
     "NumberOfCollateralSeen": "",
     "OriginatingRequestType": "APPT",
     "OtherTests": "",
     "OtherTravel": "  ",
      "DisplayClinicAppt": "YES",
     "OutpatientEncounter": "2022-11-14T10:00-0500",
     "OverLaidAppointmentData": "NO",
     "OverbookFlag": "O",
     "ParentRecordRequest": "",
  "Patient": {
    "CurrentEligibilityCode": "",
    "DFN": 44354,
    "DateOfBirth": "1951-05-27",
    "DateOfBirthInternal": 2510527,
    "DateOfDeath": "",
      "Division": "CHEYENNE VAMROC",
    "DemographicsNeedUpdate": 1,
    "Eligibility": "",
    "EligibilityIEN": "",
    "EligibilityOfVisit": "",
    "EnrollmentCode": "",
    "EnrollmentDate": "",
    "FugitiveFelonFlag": "YES",
    "Gender": "MALE",
    "ICN": "4420062490V261831",
    "LastRegistrationDate": "2022-09-26T16:23:58-0400",
      "ECheckinAllowed": "YES",
    "LocalFlag": [
     ""
    ],
    "Name": "VSE,FUGITIVE FELON",
    "NationalFlag": [
     {
      "AssignedDate": "2003-11-13T07:41:27-0500",
      "Category": "I (NATIONAL)",
      "Name": "BEHAVIORAL",
      "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": [
      ""
      "PatientFriendlyName": "CHY CARDIOLOGY",
     ],
     "PriorXRayResults": "",
     "Provider": {
      "ID": 520664036,
      "Name": "TEST,GREGORIO D",
      "SecId": ""
     },
     "PurposeOfVisit": "SCHEDULED VISIT",
     "RealAppointment": 0,
     "RequestIEN": 257996,
      "PbspID": "",
     "RequestType": "APPT",
     "Resource": {
      "ClinicIEN": 3753,
      "Name": "CHY ACUTE CARE 1"
     },
     "ResourceIEN": 2062,
     "RoutingSlipPrintDate": "",
     "RoutingSlipPrinted": "",
     "SchedulerName": "",
     "SchedulingApplication": "",
    {
      "PhysicalLocation": "ARROWHEAD BLD A1-16 OR 17",
     "SchedulingRequestType": "'NEXT AVAILABLE' APPT.",
     "SpecialSurveyDisposition": "",
     "StartTimeFM": 3221114.1,
     "Status": "INPATIENT/ACT REQ",
     "StatusCancelDateTime": "",
     "VVSApptID": "",
     "VeteranVideoCallURL": "",
     "Walkin": "",
     "WardLocation": "",
     "XRAY": "",
      "PreCheckinAllowed": "YES",
     "XrayDateTime": ""
    }
   ]
  }
      "ProhibitedClinic": 0,
      "StationNumber": 442,
      "StopCodeAMIS": 303,
      "StopCodeName": "CARDIOLOGY",
      "Telephone": "(307)778-7550",
      "TelephoneExtension": 1234,
      "TimeZone": "EASTERN",
      "TimeZoneDetails": [
     "AppointmentCancelled": "CANCELLED",
       {
        "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": "TEST,USR",
     "DateAppointmentMade": "2023-12-06T14:12:13-0500",
     "DesiredDateOfAppointment": "2023-12-06",
     "AppointmentIEN": 298114,
     "DuplicateApptSameDay": "",
     "EASTrackingNumber": "",
     "EkgDateTime": "",
     "EncounterConversionStatus": "",
     "EncounterFormsAsAddOns": "",
     "EncounterFormsPrinted": "",
     "EndTime": "2023-12-06T08:30-0500",
     "FollowUpVisit": "NO",
     "InpatientFlag": 0,
     "LabDateTime": "",
     "AppointmentType": "REGULAR",
     "LengthOfAppt": 30,
     "MRTCFlag": 1,
     "NextAvaApptIndicator": "'NEXT AVA.' APPT. INDICATED BY USER & 
CALCULATION",
     "NoShowCancelDateTime": "2023-12-06T14:17:06-0500",
     "NoShowCancelledBy": "TEST,USR",
     "Note": "TEST NOTE",
     "NoteAuditing": [
      {
       "DateNoteAdded": "2024-10-16",
     "AppointmentTypeIEN": 9,
       "Note": "TEST NOTE",
       "NoteAddedByDUZ": 123456789,
       "NoteAddedByName": "TEST,USER ONE" 
      },
     ],
     "NumberOfCollateralSeen": "",
     "OriginatingRequestType": "APPT",
     "OtherTests": "",
     "OtherTravel": "  ",
     "OutpatientEncounter": "",