/
uh_api_medical

uh_api_medical

Functional

@Mei Li Kinney

Developer

@Troy Takahashi

JIRA

BAN-3303

Server

BAN85 and BAN01 (BANPPRD and UH PROD)

Location

/buh/sct/banner/uhmods/general/dbprocs

File

uh_api_medical.sql, uh_api_medical1.sql

Users

STAR

Stored Procedures

  • p_create: Adds record to sprmedi table where pidm and medical code combination does not exist.

  • p_update: Updated record on sprmedi table where pidm and medical code combination exists.

UH_API_MEDICAL.p_create:

JSON name:value pair input. Note: the name must always be in ALL CAPS

{ "PIDM": "1234567",
"MEDI_CODE": "TB",
"MEDI_CODE_DATE": “01-JAN-2023”
“ONSET_AGE”: “1”,
“SPSR_CODE”: “MP”,
“COMMENTS”: “Imported from MedProctor via STAR”
}

JSON name:value pair output: (Overall status of API submittal returned to STAR)

{ "status": "ERROR"}

  • ERROR

  • SUCCESS

messages: (json table returned to STAR

{ "messages": “PIDM does not exist”}

  • ERROR: Message to why record was not created

  • SUCCESS: Message stating record was created

Error Messages:

  • No data submitted: No data provided on submit.

  • PIDM does not exist: The PIDM submitted is not a valid PIDM on the spriden table.

  • Medical Code not given: The medi_code submitted is null.

  • Medical Code not valid: The medi_code submitted is not one of the following: MR, TB, VC, TD, or MC.

  • Onset Age not give: The onset_age submitted is null.

  • Onset Age not valid: The onset_age submitted is not one of the following: 1, 2, 3, 4, 5, 6.

  • Disability Service Code not given: The spsr_code submitted is null.

  • Disability Service Code not valid: the spsr_code submitted does not exist in the stvspsr table.

  • Record already exists: The pidm and medi_code already exists on sprmedi table.

Successful creation add the following data:

Column

Value

Column

Value

sprmedi_pidm

PIDM

sprmedi_medi_code

MEDI_CODE

sprmedi_mdeq_code

NULL

sprmedi_comment

COMMENTS

sprmedi_disa_code

NULL

sprmedi_spsr_code

SPSR_CODE

sprmedi_onset_age

ONSET_AGE

sprmedi_disb_ind

N

sprmedi_user_id

UHAPP_STAR_USER

sprmedi_code_date

MEDI_CODE_DATE

sprmedi_data_origin

STAR API

UH_API_MEDICAL.p_update:

JSON name:value pair input. Note: the name must always be in ALL CAPS

{ "PIDM": "1234567",
"MEDI_CODE": "TB",
"MEDI_CODE_DATE": “01-JAN-2023”
“ONSET_AGE”: “1”,
“SPSR_CODE”: “MP”,
“COMMENTS”: “Imported from MedProctor via STAR”
}

JSON name:value pair output: (Overall status of API submittal returned to STAR)

{ "status": "ERROR"}

  • ERROR

  • SUCCESS

messages: (json table returned to STAR

{ "messages": “PIDM does not exist”}

  • ERROR: Message to why record was not created

  • SUCCESS: Message stating record was created

Error Messages:

  • No data submitted: No data provided on submit.

  • PIDM does not exist: The PIDM submitted is not a valid PIDM on the spriden table.

  • Medical Code not given: The medi_code submitted is null.

  • Medical Code not valid: The medi_code submitted is not one of the following: MR, TB, VC, TD, or MC.

  • Onset Age not give: The onset_age submitted is null.

  • Onset Age not valid: The onset_age submitted is not one of the following: 1, 2, 3, 4, 5, 6.

  • Disability Service Code not given: The spsr_code submitted is null.

  • Disability Service Code not valid: the spsr_code submitted does not exist in the stvspsr table.

  • Record does not exist: The pidm and medi_code does not exist on sprmedi table.

  • Record NOT created: Error inserting record.

Successful update updates the following data:

Column

Value

Column

Value

sprmedi_pidm

PIDM

sprmedi_medi_code

MEDI_CODE

sprmedi_comment

COMMENTS

sprmedi_disa_code

NULL

sprmedi_spsr_code

SPSR_CODE

sprmedi_onset_age

ONSET_AGE

sprmedi_disb_ind

N

sprmedi_user_id

UHAPP_STAR_USER

sprmedi_code_date

MEDI_CODE_DATE

sprmedi_data_origin

STAR API