Disease
The PostAddDisease endpoint is responsible for registering a new disease in the MIMS system.
How to register a disease
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddDisease |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddDisease" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| BranchNo | String(25) | Yes | External code of the branch |
| DiseaseNo | String(25) | Yes | External code of the disease |
| DiseaseName | String(40) | Yes | Disease name |
| Notes | String(2000) | No | Notes about the disease |
| Symptoms | String(2000) | No | Disease symptoms |
| DiseaseTypeNo | String(25) | No | External code of the disease type |
| OverwriteIfExists | Boolean | No | Flag indicating that data should be overwritten if the record already exists |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
| DiseaseCode | Integer | Yes | Internal disease code generated in the MIMS system |
Request Example
curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddDisease"' \
--header 'Content-Type: application/json' \
--data '{
"BranchNo": "FIL001",
"DiseaseNo": "DOE001",
"DiseaseName": "Doença Exemplo",
"Notes": "Observações sobre a doença",
"Symptoms": "Sintomas da doença",
"DiseaseTypeNo": "DT001",
"OverwriteIfExists": true
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"DiseaseCode": 456
}
🐞 Possible Errors
| Code | Message |
|---|---|
| ADE‑001 | The provided "DiseaseNo" already exists! |