# send script - requires: Simple XML # receive script - requires: Simple XML, Mailparse ##### server export medlist ---- doctor get it ##### export.php - export patient, medlist - create json file - send to email with subject [export] export_receiver.php - read mail with 10s interval - check new mail && subject starting with [export] - download json attachment file - json to XML --- template in ./xml_template/ --- xml saved to ./xml_template/xml --- json saved to ./xml_template/json or remove in source code ##### server export medlist ---- doctor get it ##### ############################################################################ API notes /get_seen_patients method: POST params: doctor_id response: object -- status: true|false -- patients: array of patients object /request_read_access method: POST params: -- doctor_id -- patient_id /patient_deny method: POST params: -- doctor_id -- patient_id /patient_allow method: POST params: -- doctor_id -- patient_id -- type: permanent => no expire others: 1 day