API Diseases

See API Specification

Diseases GET

Version Added: 21.3

PatNum is required. Gets a list of all diseases (Problems) that are assigned to the patient.

Example Request:
GET /diseases?PatNum=41

Example Response:
[
{
"DiseaseNum": 2,
"PatNum": 41,
"DiseaseDefNum": 44,
"diseaseDefName": "COPD",
"PatNote": "",
"ProbStatus": "Active",
"DateStart": "0001-01-01 00:00:00",
"DateStop": "0001-01-01 00:00:00"
},
{
"DiseaseNum": 8,
"PatNum": 41,
"DiseaseDefNum": 58,
"diseaseDefName": "Severe Back Pain",
"PatNote": "",
"ProbStatus": "Inactive",
"DateStart": "0001-01-01 00:00:00",
"DateStop": "0001-01-01 00:00:00"
},
etc...
]

200 OK
400 BadRequest "PatNum is required"
404 NotFound "Patient not found"

Diseases POST

Version Added: 21.3

Attaches a diseaseDef (Problem) to a patient.

PatNum: Required.
DiseaseDefNum: Rarely used. Just use diseaseDefName instead, which handles insertion of DiseaseDef automatically.
diseaseDefName: Required unless you choose to use DiseaseDefNum.
DateStart: Optional. String in "yyyy-MM-dd" format. Default "0001-01-01".
DateStop: Optional. String in "yyyy-MM-dd" format. Default "0001-01-01".
ProbStatus: Optional. Either "Active", "Resolved" or "Inactive". Default "Active".
PatNote: Optional.

Example Requests:
POST /diseases

{
"PatNum": 74,
"diseaseDefName": "Diabetes"
}

{
"PatNum": 74,
"DiseaseDefName": "Severe Back Pain",
"ProbStatus": "Resolved",
"PatNote": "Patient underwent corrective surgery 04/11/2019",
"DateStart": "2016-01-01",
"DateStop": "2019-04-30"
}

Example Response:
201 Created
400 BadRequest (Missing or Invalid fields)
404 NotFound "Patient not found" or "DiseaseDef not found"

Diseases PUT

Version Added: 22.1

Updates a disease (Problem) for a patient.

DiseaseNum: Required in the URL.
DateStart: Optional. String in "yyyy-MM-dd" format.
DateStop: Optional. String in "yyyy-MM-dd" format.
ProbStatus: Optional. Either "Active", "Resolved" or "Inactive".
PatNote: Optional. Will overwrite existing note.

Example Request:
PUT /diseases/8

{
"ProbStatus": "Resolved",
"DateStart": "2020-10-01",
"DateStop": "2022-05-25"
}

Example Response:
200 OK
400 BadRequest (with explanation)
404 NotFound "Disease not found."

Diseases DELETE

Version Added: 22.1

Deletes a disease (Problem) for a patient.

DiseaseNum: Required in the URL.

Example Request:
DELETE /diseases/8

Example Response:
200 OK
400 BadRequest (with explanation)
404 NotFound "Disease not found."