Skip to content

The most popular open source electronic health records and medical practice management solution.

License

Notifications You must be signed in to change notification settings

DiscoverAndChange/openemr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

img

(Project is in-flight - do not use in production).

Goal

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.

Team

Endpoints

POST /api/facility

curl -X POST 'http: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"
}'

PUT /api/facility/:fid

curl -X PUT 'http: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"
}'

GET /api/facility

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/facility'

GET /api/facility/:fid

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/facility/1'

GET /api/provider

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/provider'

GET /api/provider/:prid

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/provider/1'

POST /api/patient

curl -X POST 'http: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": ""
}'

GET /api/patient

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient'

GET /api/patient/:pid

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1'

GET /api/patient/:pid/encounter

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/encounter'

GET /api/patient/:pid/encounter/:eid

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/encounter/1'

POST /api/patient/:pid/medical_problem

curl -X POST 'http: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"
}'

PUT /api/patient/:pid/medical_problem/:mid

curl -X PUT 'http: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"
}'

GET /api/patient/:pid/medical_problem

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/medical_problem'

GET /api/patient/:pid/medical_problem/:mid

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/medical_problem/1'

POST /api/patient/:pid/allergy

curl -X POST 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/allergy' -d \
'{
    "title": "Iodine",
    "begdate": "2010-10-13",
    "enddate": null
}'

PUT /api/patient/:pid/allergy/:aid

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
}'

GET /api/patient/:pid/allergy

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/allergy'

GET /api/patient/:pid/allergy/:aid

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/allergy/1'

POST /api/patient/:pid/medication

curl -X POST 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/medication' -d \
'{
    "title": "Norvasc",
    "begdate": "2013-10-13",
    "enddate": null
}'

PUT /api/patient/:pid/medication/:mid

curl -X PUT 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/medication/1' -d \
'{
    "title": "Norvasc",
    "begdate": "2013-04-13",
    "enddate": null
}'

GET /api/patient/:pid/medication

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/medication'

GET /api/patient/:pid/medication/:mid

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/medication/1'

POST /api/patient/:pid/surgery

curl -X POST 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/surgery' -d \
'{
    "title": "Blepharoplasty",
    "begdate": "2013-10-13",
    "enddate": null,
    "diagnosis": "CPT4:15823-50"
}'

PUT /api/patient/:pid/surgery/:sid

curl -X PUT 'http: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"
}'

GET /api/patient/:pid/surgery

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/surgery'

GET /api/patient/:pid/surgery/:sid

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/surgery/1'

POST /api/patient/:pid/dental_issue

curl -X POST 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/dental_issue' -d \
'{
    "title": "Halitosis",
    "begdate": "2015-03-17",
    "enddate": null
}'

PUT /api/patient/:pid/dental_issue/:did

curl -X PUT 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/dental_issue/1' -d \
'{
    "title": "Halitosis",
    "begdate": "2015-03-17",
    "enddate": "2018-03-20"
}'

GET /api/patient/:pid/dental_issue

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/dental_issue'

GET /api/patient/:pid/dental_issue/:did

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/patient/1/dental_issue/1'

GET /api/list/:list_name

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/list/medical_problem_issue_list'

GET /api/version

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/version'

GET /api/product

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/product'

GET /api/insurance_company

curl -X GET 'http:https://localhost:8300/rest_router.php?resource=/api/insurance_company'

Dev Notes

  • 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.

Project Management

  • TODO(team): Consider using Symfony's router
  • TODO(matthew): Use Patient.pid instead of Patient.id for REST mapping
  • TODO(matthew): Implement Particle's optional validation logic for all current validators
  • TODO(matthew): API for SOAP notes
  • TODO(?): Prevent ListService from using enddate of 0000-00-00 by default
  • TODO(?): PatientService's insert doesn't handle dob correctly
  • TODO(?): Patient PUT
  • TODO(?): Patient search filter
  • TODO(?): insurance company PUT/POST
  • TODO(?): API for pharmacies
  • TODO(?): API for vitals
  • TODO(?): API for appointments
  • 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

What is that dog drawing?

That is Peppy, an old OpenEMR mascot. Long live Peppy!

License

GNU GPL

About

The most popular open source electronic health records and medical practice management solution.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 84.3%
  • JavaScript 5.0%
  • XSLT 4.2%
  • HTML 3.2%
  • Twig 1.1%
  • CSS 0.7%
  • Other 1.5%