Last active
June 2, 2017 01:05
-
-
Save blakewest/03ac8e9dc7e96c92db44cedcea1d6746 to your computer and use it in GitHub Desktop.
Procedures API Option 1.1 ("procedures w/ visit_id")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
// Option 1: Procedures with visit_id | |
// Standard CRUD actions to /api/provider/procedures | |
// GET /api/provider/procedures | |
// POST /api/provider/procedures | |
// GET /api/provider/procedures/:id | |
// PATCH /api/provider/procedures/:id | |
// DELETE /api/provider/procedures/:id | |
Business Logic: | |
- The visit_id param can act as a glue and an identifier for the procedures. | |
We would validate that the same proceudre is unique across visit_ids. It also helps us ensure that a partner doesn't | |
accidentally send us the same procedure twice, and end up creating two invoices. | |
*/ | |
// Params: | |
{ | |
procedure_code: // String (required), | |
procedure_code_modifiers: // (array of 0-4 two character strings, unique in array, case insensitive, defaults to empty), | |
date: // String (YYYY-MM-DD), | |
quantity: // Integer (defaults to 1), | |
fixed_price_in_cents: // Integer, | |
fixed_description: // String, | |
patient: { | |
id: // String (the Hint ID, or Integration Record ID. Required) | |
}, | |
practitioner: { | |
id: // String (the Hint ID, or Integration Record ID. Defaults to patient's practitioner) | |
}, | |
category: { | |
id: // String (the Hint ID, or Integration Record ID. Defaults to charge item category) | |
}, | |
visit_id: // String (a unique ID that ties together procedures. We will validate, for instance, that the same procedure code does not show up twice across a visit ID). | |
} | |
// Example Response (200) | |
{ | |
created_at: "2017-02-05 14:23:00 UTC", | |
updated_at: "2017-02-05 14:23:00 UTC", | |
procedure_code: 'A4000', | |
procedure_code_modifiers: [], | |
date: '2017-03-11', | |
quantity: 1, | |
status: 'invoiced', | |
fixed_price_in_cents: null, | |
fixed_description: null, | |
patient: { | |
id: 'pat-999' | |
}, | |
practitioner: { | |
id: 'pct-1232' | |
}, | |
category: { | |
id: 'cat-3434' | |
}, | |
visit_id: 'vis-9393' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment