API Allergies
Version Added: 21.1
PatNum is required. Gets a list of all allergies that that are assigned to the patient.
Example Request:
GET /allergies?PatNum=15
Example Response:
[
{
"AllergyNum": 1,
"AllergyDefNum": 4,
"PatNum": 15,
"defDescription": "Penicillin",
"defSnomedType": "None",
"Reaction": "Rash",
"StatusIsActive": "true",
"DateAdverseReaction": "2020-03-18"
},
etc...
]
Version Added: 21.3
Attaches an allergyDef to a patient.
AllergyDefNum: Rarely used. Just use defDescription instead, which handles insertion of AllergyDef automatically.
PatNum: Required.
defDescription: Required unless you choose to use AllergyDefNum.
Reaction: Optional. String describing the adverse reaction.
StatusIsActive: Optional. Either "true" or "false". Default "true".
DateAdverseReaction: Optional. String in "yyyy-MM-dd" format. Default "0001-01-01".
Example Requests:
POST /allergies
{
"PatNum": 12,
"defDescription": "Propranolol"
}
{
"PatNum": 12,
"defDescription": "Penicillin",
"Reaction": "Hives",
"DateAdverseReaction": "2019-09-23"
}
Example Response:
201 Created
400 BadRequest (Missing or Invalid fields)
404 NotFound "Patient not found" or "AllergyDef not found"
Version Added: 22.1
Updates the allergy associated with a patient.
AllergyNum: Required in the URL.
Reaction: String describing the adverse reaction.
DateAdverseReaction:String in "yyyy-MM-dd" format.
StatusIsActive: Either "true" or "false".
Example Requests:
PUT /allergies/12
{
"Reaction": "Rash",
"DateAdverseReaction": "2022-04-13",
"StatusIsActive": "true"
}
Example Response:
200 OK
400 BadRequest (with explanation)
404 NotFound (AllergyNum not found)
Version Added: 22.1
Deletes an allergy associated with a patient.
AllergyNum: Required in the URL.
Example Requests:
DELETE /allergies/13
Example Response:
200 OK
404 NotFound (AllergyNum not found)