API Docs

REST API reference

API Methods

Identifier

POST /demographics/identifier/new/

Create new identifier.

Query params:data (json) –

identifier data: {

‘type’: String or None, ‘domain’: String or None, ‘identifier’: String

}

Responseheader Content-Type:
 application/json :parameter boolean success: True if the identifier is successfully created. False otherwise :parameter str message: a feedback string that would be displayed to the user :parameter str errors: an error string that explains the raised problems :parameter json data: if success is True, it contains the created identifier data in json format
GET /demographics/identifier/get/

Get the information of an identifier

Query params:query_string (str) – the query string to search.
Responseheader Content-Type:
 application/json :parameter boolean success: True if identifiers are successfully found. False otherwise :parameter str message: a feedback string that would be displayed to the user :parameter str errors: an error string that explains the raised problems :parameter json data: if success is True, it contains the found identifiers data in json format
POST /demographics/identifier/(identifier_id)/edit/

Edit the information of an identifier identified by identifier_id

Query params:data (json) –

identifier data: {

‘id’: String, ‘type’: String or None, ‘domain’: String or None, ‘identifier’: String

}

Responseheader Content-Type:
 application/json :parameter boolean success: True if identifier is successfully edited. False otherwise :parameter str message: a feedback string that would be displayed to the user :parameter str errors: an error string that explains the raised problems :parameter json data: if success is True, it contains the edited identifier data in json format

City

POST /demographics/city/new/

Create new city.

Query params:data (json) –

city data: {

‘name’: String, ‘province’: String or None, ‘state’: String, ‘code’: String or None

}

Responseheader Content-Type:
 application/json :parameter boolean success: True if the city is successfully created. False otherwise :parameter str message: a feedback string that would be displayed to the user :parameter str errors: an error string that explains the raised problems :parameter json data: if success is True, it contains the created city data in json format
GET /demographics/city/get/

Get the information of a city

Query params:query_string (str) – the query string to search.
Responseheader Content-Type:
 application/json :parameter boolean success: True if cities are successfully found. False otherwise :parameter str message: a feedback string that would be displayed to the user :parameter str errors: an error string that explains the raised problems :parameter json data: if success is True, it contains the found cities data in json format
POST /demographics/city/(city_id)/edit/

Edit the information of a city identified by city_id

Query params:data (json) –

city data: {

‘id’: String, ‘name’: String, ‘province’: String or None, ‘state’: String, ‘code’: String or None

}

Responseheader Content-Type:
 application/json :parameter boolean success: True if city is successfully edited. False otherwise :parameter str message: a feedback string that would be displayed to the user :parameter str errors: an error string that explains the raised problems :parameter json data: if success is True, it contains the edited city data in json format

Patient module

POST /demographics/patient/new/

Create new patient.

Query params:data (json) –

patient data: {

‘account_number’: String or None, ‘first_name’: String, ‘last_name’: String, ‘other_ids’: Array of Int or None, ‘gender’: ‘M’ | ‘F’, ‘birth_date’: Date, ‘birth_place’: Int, ‘address’: String or None, ‘city’: Int or None, ‘phone’: String or None, ‘mobile’: String or None, ‘email’: String or None, ‘certified_email’: String or None, ‘active’: True | False

}

Responseheader Content-Type:
 application/json :parameter boolean success: True if the patient is successfully created. False otherwise :parameter str message: a feedback string that would be displayed to the user :parameter str errors: an error string that explains the raised problems :parameter json data: if success is True, it contains the created patient data in json format
GET /demographics/patient/get/

Get the information of a patient

Query params:query_string (str) – the query string to search.
Responseheader Content-Type:
 application/json :parameter boolean success: True if patients are successfully found. False otherwise :parameter str message: a feedback string that would be displayed to the user :parameter str errors: an error string that explains the raised problems :parameter json data: if success is True, it contains the found patients data in json format
POST /demographics/patient/(patient_id)/edit/

Edit the information of a patient identified by patient_id

Query params:data (json) –

patient data: {

‘id’: String, ‘account_number’: String or None, ‘first_name’: String, ‘last_name’: String, ‘other_ids’: Array of Int or None, ‘gender’: ‘M’ | ‘F’, ‘birth_date’: Date, ‘birth_place’: Int, ‘address’: String or None, ‘city’: Int or None, ‘phone’: String or None, ‘mobile’: String or None, ‘email’: String or None, ‘certified_email’: String or None, ‘active’: True | False

}

Responseheader Content-Type:
 application/json :parameter boolean success: True if patient is successfully edited. False otherwise :parameter str message: a feedback string that would be displayed to the user :parameter str errors: an error string that explains the raised problems :parameter json data: if success is True, it contains the edited patient data in json format
POST /demographics/patient/(patient_id)/deactivate/

Deactivate a patient identified by patient_id

Responseheader Content-Type:
 application/json :parameter boolean success: True if patient is successfully deactivated. False otherwise :parameter str message: a feedback string that would be displayed to the user :parameter str errors: an error string that explains the raised problems :parameter json data: if success is True, it contains the deactivated patient data in json format
POST /demographics/patient/(patient_id)/activate/

Activate a patient identified by patient_id

Responseheader Content-Type:
 application/json :parameter boolean success: True if patient is successfully activated. False otherwise :parameter str message: a feedback string that would be displayed to the user :parameter str errors: an error string that explains the raised problems :parameter json data: if success is True, it contains the activated patient data in json format