(Project is in-flight - do not use in production).
This project aims to provide an easy-to-use JSON-based REST API for OpenEMR's most common functions. All code will be done in classes and separate from the view to help with codebase modernization efforts.
- @juggernautsei
- @matthewvi
- ?
- ?
- ?
curl -X POST 'https://localhost:8300/rest_router.php?resource=/api/facility' -d \
'{
"name": "Aquaria",
"phone": "808-606-3030",
"fax": "808-606-3031",
"street": "1337 Bit Shifter Ln",
"city": "San Lorenzo",
"state": "ZZ",
"postal_code": "54321",
"email": "[email protected]",
"service_location": "1",
"billing_location": "1",
"color": "#FF69B4"
}'
curl -X PUT 'https://localhost:8300/rest_router.php?resource=/api/facility/1' -d \
'{
"name": "Aquaria",
"phone": "808-606-3030",
"fax": "808-606-3031",
"street": "1337 Bit Shifter Ln",
"city": "San Lorenzo",
"state": "AZ",
"postal_code": "54321",
"email": "[email protected]",
"service_location": "1",
"billing_location": "1",
"color": "#FF69B4"
}'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/facility'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/facility/1'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/provider'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/provider/1'
curl -X POST 'https://localhost:8300/rest_router.php?resource=/api/patient' -d \
'{
"title": "Mr",
"fname": "Foo",
"mname": "",
"lname": "Bar",
"street": "456 Tree Lane",
"postal_code": "08642",
"city": "FooTown",
"state": "FL",
"country_code": "US",
"phone_contact": "123-456-7890",
"dob": "1992-02-02",
"sex": "Male",
"race": "",
"ethnicity": ""
}'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient&fname=...&lname=...&dob=...'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/encounter'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/encounter/1'
curl -X POST 'https://localhost:8300/rest_router.php?resource=/api/patient/1/encounter/1/soap_note' -d \
'{
"subjective": "...",
"objective": "...",
"assessment": "...",
"plan": "..."
}'
curl -X PUT 'https://localhost:8300/rest_router.php?resource=/api/patient/1/encounter/1/soap_note/:sid' -d \
'{
"subjective": "...",
"objective": "...",
"assessment": "...",
"plan": "..."
}'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/encounter/1/soap_note'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/encounter/1/soap_note/1'
curl -X POST 'https://localhost:8300/rest_router.php?resource=/api/patient/1/medical_problem' -d \
'{
"title": "Dermatochalasis",
"begdate": "2010-04-13",
"enddate": null,
"diagnosis": "ICD10:H02.839"
}'
curl -X PUT 'https://localhost:8300/rest_router.php?resource=/api/patient/1/medical_problem/1' -d \
'{
"title": "Dermatochalasis",
"begdate": "2010-04-13",
"enddate": "2018-03-12",
"diagnosis": "ICD10:H02.839"
}'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/medical_problem'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/medical_problem/1'
curl -X POST 'https://localhost:8300/rest_router.php?resource=/api/patient/1/allergy' -d \
'{
"title": "Iodine",
"begdate": "2010-10-13",
"enddate": null
}'
curl -X PUT 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/allergy/1' -d \
'{
"title": "Iodine",
"begdate": "2012-10-13",
"enddate": null
}'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/allergy'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/allergy/1'
curl -X POST 'https://localhost:8300/rest_router.php?resource=/api/patient/1/medication' -d \
'{
"title": "Norvasc",
"begdate": "2013-10-13",
"enddate": null
}'
curl -X PUT 'https://localhost:8300/rest_router.php?resource=/api/patient/1/medication/1' -d \
'{
"title": "Norvasc",
"begdate": "2013-04-13",
"enddate": null
}'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/medication'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/medication/1'
curl -X POST 'https://localhost:8300/rest_router.php?resource=/api/patient/1/surgery' -d \
'{
"title": "Blepharoplasty",
"begdate": "2013-10-13",
"enddate": null,
"diagnosis": "CPT4:15823-50"
}'
curl -X PUT 'https://localhost:8300/rest_router.php?resource=/api/patient/1/surgery/1' -d \
'{
"title": "Blepharoplasty",
"begdate": "2013-10-14",
"enddate": null,
"diagnosis": "CPT4:15823-50"
}'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/surgery'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/surgery/1'
curl -X POST 'https://localhost:8300/rest_router.php?resource=/api/patient/1/dental_issue' -d \
'{
"title": "Halitosis",
"begdate": "2015-03-17",
"enddate": null
}'
curl -X PUT 'https://localhost:8300/rest_router.php?resource=/api/patient/1/dental_issue/1' -d \
'{
"title": "Halitosis",
"begdate": "2015-03-17",
"enddate": "2018-03-20"
}'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/dental_issue'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/dental_issue/1'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/list/medical_problem_issue_list'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/version'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/product'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/insurance_company'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/appointment'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/appointment/1'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/appointment'
curl -X GET 'https://localhost:8300/rest_router.php?resource=/api/patient/1/appointment/1'
curl -X POST 'https://localhost:8300/rest_router.php?resource=/api/patient/1/appointment' -d
'{
"pc_eid":"1",
"pc_catid": "5",
"pc_title": "Office Visit",
"pc_duration": "900",
"pc_hometext": "Test",
"pc_apptstatus": "-",
"pc_eventDate": "2018-10-19",
"pc_startTime": "09:00",
"pc_facility": "9",
"pc_billing_facility": "10"
}'
- For business logic, make or use the services here
- For controller logic, make or use the classes here
- For routing declarations, use the class here.
- TODO(team): Consider using Symfony's router
- TODO(matthew): Implement Particle's
optional
validation logic for all current validators - TODO(matthew): API for appointments
- TODO(?): Prevent
ListService
from usingenddate
of0000-00-00
by default - TODO(?):
PatientService
'sinsert
doesn't handledob
correctly - TODO(?): Patient PUT
- TODO(?): insurance company PUT/POST
- TODO(?): API for pharmacies
- TODO(?): API for vitals
- TODO(?): API for onotes
- TODO(?): API for fee sheets
- TODO(?): API for patient documents
- TODO(?): API for prescriptions
- TODO(?): API for messages
- TODO(?): Implement token-based authentication
That is Peppy, an old OpenEMR mascot. Long live Peppy!