SDES2 EDIT APPT REQ2 (5203)    REMOTE PROCEDURE (8994)

Name Value
NAME SDES2 EDIT APPT REQ2
TAG EDITREQUEST
ROUTINE SDES2EDITAPREQ2
RETURN VALUE TYPE ARRAY
AVAILABILITY RESTRICTED
WORD WRAP ON FALSE
APP PROXY ALLOWED Yes
DESCRIPTION
 This RPC allows the editing of an appointment request and will return
 the full appointment request object.
  
 Can only be invoked by Acheron
INPUT PARAMETER
  • SDCONTEXT
    PARAMETER TYPE:   LIST
    REQUIRED:   YES
    SEQUENCE NUMBER:   1
    DESCRIPTION:   
        SDCONTEXT("ACHERON AUDIT ID")
        SDCONTEXT("PATIENT ICN")
         - The ICN of the target patient from the calling application.
         - Up to 40 Character unique ID number. 
         - Ex: 11d9dcc6-c6a2-4785-8031-8261576fca37
        SDCONTEXT("USER DUZ")
         - The DUZ of the user taking action in the calling application.
        SDCONTEXT("USER SECID")
         - The SECID of the user taking action in the calling application.
        SDCONTEXT("PATIENT DFN")
         - The DFN/IEN of the target patient from the calling application.
    
  • REQUEST
    PARAMETER TYPE:   LIST
    REQUIRED:   YES
    SEQUENCE NUMBER:   2
    DESCRIPTION:   
     Appointment request data that is being edited. Non-required data fields
       when editing a child, this is the new PID date for the child
     S REQUEST("PRIORITY")=""                                  OPT
     S REQUEST("REQUESTED BY")=""                              OPT
     S REQUEST("CLINIC IEN")=""                                OPT/REQ  \
     S REQUEST("PRIMARY AMIS")=""                              OPT/REQ---> 
     Either CLINIC IEN or PRIMARY AMIS/CREDIT PRIMARY AMIS must be defined
     S REQUEST("CREDIT AMIS")=""                               OPT/REQ  /
     S REQUEST("STATION NUMBER")=""                            OPT/REQ -- > 
     Either STATION NUMBER or INSTITUTION NAME is REQUIRED
     S REQUEST("INSTITUTION NAME")=""                          OPT/REQ --/
     that are not changing should not be passed into this RPC. The intent of
     S REQUEST("PROVIDER IEN")=""                              OPT
       (Required if 'REQUESTED BY' is 'PROVIDER')
     S REQUEST("PRIORITY GROUP")=""                            OPT
     S REQUEST("SERVICE CONNECTED")=""                         OPT
       (This is for PRIORITY; 1 OR 0, if passed)
     S REQUEST("SERVICE CONNECTED PERCENTAGE")=""              OPT
     S REQUEST("MODALITY")=""                                  OPT
     S REQUEST("PATIENT STATUS")=""                            OPT
     S REQUEST("VAOS GUID")=""                                 OPT
     S REQUEST("TIME SENSITIVE")=""                            OPT
     the edit is to only validate and store fields that are changing.
     S REQUEST("REQUEST COMMENT")=""                           OPT
     S REQUEST("PATIENT COMMENT")=""                           OPT
     S REQUEST("PATIENT PREFERRED START DATE",1)=""            OPT
     S REQUEST("PATIENT PREFERRED END DATE",1)=""              OPT
     S REQUEST("PATIENT PREFERRED START DATE",2)=""            OPT
     S REQUEST("PATIENT PREFERRED END DATE",2)=""              OPT
     S REQUEST("PATIENT PREFERRED START DATE",3)=""            OPT
     S REQUEST("PATIENT PREFERRED END DATE",3)=""              OPT
     S REQUEST("MRTC","PARENT REQUEST")=""                     OPT
     S REQUEST("DUPLICATE REASON")=""                          OPT
      
      
     * Will only validate and edit fields that are changing.
     S REQUEST("REQUEST IEN")=""                               REQ
     S REQUEST("DFN")=""                                       REQ
     S REQUEST("APPOINTMENT TYPE")=""                          OPT
       APPOINTMENT TYPE - can be the Name or IEN
     S REQUEST("PATIENT INDICATED DATE")=""                    OPT
    
RETURN PARAMETER DESCRIPTION
 This is the fully expanded return JSON. Not all components will
    "ApptType": "",
     }
    ],
    "CreateDate": "",
    "CreditStopCodeAMIS": 117,
    "CreditStopCodeIEN": 123,
    "CreditStopCodeName": "NURSING (2ND ONLY)",
    "DateLinkedApptMade": "",
    "DateTimeEntered": "",
    "DisplayClinicAppt": "YES",
    "DispositionIEN": "",
    "ByPatientOrProvider": "",
    "DispositionReason": "",
    "DispositionedBy": "",
    "DispositionedDate": "",
    "DuplicateReason": "DUPLICATE REASON TEXT",
    "EASTrackingNumber": "",
    "EnrollmentPriorityGroup": "GROUP 3",
    "EnteredByIEN": 123456,
    "EnteredByName": "USER ,TEST G",
    "InstitutionIEN": "",
    "InstitutionName": "",
    "CPRSOrderID": "",
    "InstitutionNumber": "",
    "LinkedApptClinic": "",
    "LinkedApptCreditStopCode": "",
    "LinkedApptEnteredBy": "",
    "LinkedApptInstitutionName": "",
    "LinkedApptInstitutionNumber": "",
    "LinkedApptStationNumber": "",
    "LinkedApptStatus": "",
    "LinkedApptStopCode": "",
    "MRTC": [
    "CPRSPreRequisites": [
     {
      "ChildRequestIEN": 264525,
      "ChildRequestSequenceNumber": 1,
      "LinkedAppointmentIEN": 298941,
      "PatientIndicatedDate": "2024-03-06"
     },
     {
      "ChildRequestIEN": 264526,
      "ChildRequestSequenceNumber": 2,
      "LinkedAppointmentIEN": "",
     {
      "PatientIndicatedDate": "2024-03-13"
     },
     {
      "ChildRequestIEN": 264527,
      "ChildRequestSequenceNumber": 3,
      "LinkedAppointmentIEN": "",
      "PatientIndicatedDate": "2024-03-20"
     }
    ],
    "MRTCDaysBetweenAppts": "",
      "PreRequisite": "PRE-REQ 434"
    "MRTCHowManyNeeded": "",
    "MRTCNeeded": "",
    "MRTCTotal": "",
    "ModalityCode": "",
    "ModalityName": "",
    "PIDChangeAllowed": "",
    "ParentRequestIEN": "",
    "PatientComment": [
     {
      "Comment": "TESTING TESTING TESTING 123 "
     },
     },
     {
      "Comment": "Patient preferred date range #1: Jul 25, 2022@10:00 to 
 Jul 31, 2022@10:00 "
     },
     {
      "Comment": "Patient preferred date range #2: Aug 17, 2022@10:00 to 
 Aug 31, 2022@10:00 "
     },
     {
     {
      "Comment": "Patient preferred date range #3: Sep 30, 2022@10:00 to 
 Oct 01, 2022@10:00"
     }
    ],
    "PatientICN": "",
    "PatientIEN": 11221122,
    "PatientIndicatedDate": "",
    "PatientLast4": 4607,
    "PatientName": "PATIENT, TEST",
    "PatientPhone": 999-999-9999,
      "PreRequisite": "PRE-REQ 534"
    "PatientStatus": "",
    "Priority": "",
    "ProviderIEN": "",
    "ProviderName": "",
    "ProviderSecID": "",
    "RecallAccessionNumber": "",
    "RecallAppointmentLength": 30,
    "RecallAppointmentType": "YEARLY EXAM",
    "RecallClinicSecondaryStopCodeAMIS": 117,
    "RecallClinicSecondaryStopCodeIEN": 123,
     },
    "RecallClinicSecondaryStopCodeName": "NURSING (2ND ONLY)",
    "RecallClinicStopCodeAMIS": 323,
    "RecallClinicStopCodeIEN": 296,
    "RecallClinicStopCodeName": "PRIMARY CARE\/MEDICINE",
    "RecallComment": "RTC IN 1 YEAR W LABS PER RTC ORDER\/\/CID=032918",
    "RecallDateReminderSent": "2018-01-28",
    "RecallEnteredBySecID": 1234,
    "RecallFastingNonFasting": "FASTING",
    "RecallGAFScore": "New GAF Required",
    "RecallProviderIEN": 27,
 contain data. For example, if the record is not an MRTC, the 
     {
    "RecallProviderIndicatedDate": "2018-03-29",
    "RecallProviderName": "TEST,PROVIDER A",
    "RecallProviderNewPersonIEN":123123,
    "RecallProviderSecID": "",
    "RecallSecondPrint": "",
    "RecallSimilarPatientData": "",
    "RequestComments": "",
    "RequestIEN": 206674,
    "RequestSubType": "",
    "ScheduledDateOfAppt": "",
      "PreRequisite": "PRE-REQ 634"
    "SdecContactDateOfLastLetterSent": "",
    "SdecContactNumberOfCalls": "",
    "SdecContactNumberOfContacts": 0,
    "SdecContactNumberOfEmailContact": "",
    "SdecContactNumberOfLetters": "",
    "SdecContactNumberOfSecureMessage": "",
    "SdecContactNumberOfTextContact": "",
    "SensitiveRecord": 0,
    "ServiceConnectedPercentage": "",
    "ServiceConnectedPriority": "",
     }
    "Status": "",
    "Type": ""
   }
 
 
  ]
 }
 
  General Error Return Object:
  {
    ],
     "Error":[
        "Service connected percentage must be a numeric value between 1 
and 100."
     ],
         "Request":[
                ""
        ]
  }
    "CPRSStatus": "",
    "CPRSTimeSensitive": "",
    "ChildRequestSequenceNumber": "",
    "ClinicIEN": "" ,
    "ClinicName": "",
    "ClinicSecondaryStopCodeAMIS": "",
 MRTC component will exist, but will not have any data. This 
    "ClinicSecondaryStopCodeIEN": "",
    "ClinicSecondaryStopCodeName": "",
    "ClinicStopCodeAMIS": "",
    "ClinicStopCodeIEN": "",
    "ClinicStopCodeName": "",
    "CommentMultiple": [
     {
      "CommAddedByDUZ": 123456789,
      "CommAddedByName": "TEST,USER ONE", 
      "Comment": "This is an appt request comment 333333777",
 also applies to other components such as CPRSPreRequisites,
      "DateCommAdded": "2024-10-16T09:30:00"
     },
    ],
    "ConsultAssociatedStopCodes": [
     {
      "AmisStopCode": 116,
      "RestrictionType": "E",
      "StopCode": 379,
      "StopCodeName": "RESPIRATORY THERAPY"
     },
 ConsultAssociatedStopCodes, ContactAttempts, etc.
     {
      "AmisStopCode": 303,
      "RestrictionType": "E",
      "StopCode": 147,
      "StopCodeName": "CARDIOLOGY"
     },
     {
      "AmisStopCode": 107,
      "RestrictionType": "P",
      "StopCode": 114,
  
      "StopCodeName": "EKG"
     },
     {
      "AmisStopCode": 115,
      "RestrictionType": "E",
      "StopCode": 122,
      "StopCodeName": "ULTRASOUND (US)"
     }
    ],
    "ConsultCanEditPid": "",
 {
    "ConsultClinicIndicatedDate": "",
    "ConsultCovidPriority": "",
    "ConsultDateReleasedFromCPRS": "",
    "ConsultProhibitedClinicFlag": "",
    "ConsultRequestType": "",
    "ConsultServiceRenderedAs": "",
    "ConsultToService": "",
    "ConsultUrgencyOrEarliestDate": "",
    "Contact": {
     "Clinic": 5260,
  "Request": [
     "ClinicStopCodeAMIS": 323,
     "ID": 2529,
     "MainSequence": 1,
     "Patient": 7201233,
     "PreferredDate": "2024-02-24",
     "RequestPointer": "12345;SDEC(409.85,",
     "RequestType": "A",
     "Service": ""
    },
    "ContactAttempts": [
   {
     {
      "Comments": "ONE CONTACT ATTEMPT FOR VSE 7306",
      "DateTimeEntered": "2024-02-23T11:43:23-0500",
      "DateTimeOfContact": "2024-02-23T11:42:58-0500",
      "EnteredByIEN": 12345,
      "EnteredByName": "USER, VSETEST",
      "EnteredBySecID": 456789,
      "LeftMessage": "NO",
      "Sequence": 1,
      "Type": "TEXT"