-
Notifications
You must be signed in to change notification settings - Fork 23
Add procedure history management system with encounter type and form #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,194 @@ | ||
| { | ||
| "name": "Procedure Form", | ||
| "pages": [ | ||
| { | ||
| "label": "Procedure History", | ||
| "sections": [ | ||
| { | ||
| "label": "Procedure History", | ||
| "isExpanded": "true", | ||
| "questions": [ | ||
| { | ||
| "type": "obs", | ||
| "questionOptions": { | ||
| "rendering": "select", | ||
| "isSearchable": true, | ||
| "concept": "1651AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "answers": [ | ||
| { | ||
| "concept": "441AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Clean and dressing" | ||
| }, | ||
| { | ||
| "concept": "1934AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Suture wound with dressing" | ||
| }, | ||
| { | ||
| "concept": "654781a2-5b3d-4fc6-a55b-66e8d7bce2f8", | ||
| "label": "Orbital surgery" | ||
| }, | ||
| { | ||
| "concept": "646e5c57-c07d-4752-b1b3-dc4e14959419", | ||
| "label": "Valvuloplasty" | ||
| } | ||
| ] | ||
| }, | ||
| "id": "procedurePerformed", | ||
| "label": "Name of Procedure performed", | ||
Mwanje marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Mwanje marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "required": true | ||
| }, | ||
| { | ||
| "type": "obs", | ||
| "questionOptions": { | ||
| "rendering": "datetime", | ||
| "concept": "160715AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" | ||
| }, | ||
| "id": "procedureDate", | ||
Mwanje marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "label": "Date/time procedure performed", | ||
denniskigen marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Mwanje marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "datePickerFormat": "both", | ||
| "validators": [ | ||
| { | ||
| "type": "date", | ||
| "allowFutureDates": "false" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "type": "obs", | ||
| "questionOptions": { | ||
| "rendering": "datetime", | ||
| "concept": "167132AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" | ||
| }, | ||
| "id": "procedureEndDate", | ||
| "label": "Procedure end date/time", | ||
Mwanje marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Mwanje marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "datePickerFormat": "both", | ||
| "validators": [ | ||
| { | ||
| "type": "date", | ||
| "allowFutureDates": "true" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "type": "obs", | ||
| "questionOptions": { | ||
| "rendering": "text", | ||
| "concept": "163049AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" | ||
| }, | ||
| "id": "procedureSite", | ||
| "label": "Procedure site" | ||
| }, | ||
| { | ||
| "type": "obs", | ||
| "questionOptions": { | ||
| "rendering": "select", | ||
| "concept": "160721AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "answers": [ | ||
| { | ||
| "concept": "160717AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Procedure outcome satisfactory to patient" | ||
| }, | ||
| { | ||
| "concept": "160718AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Procedure outcome satisfactory to physician" | ||
| }, | ||
| { | ||
| "concept": "160719AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Procedure outcome unsatisfactory to patient" | ||
| }, | ||
| { | ||
| "concept": "160720AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Procedure outcome unsatisfactory to physician" | ||
| } | ||
| ] | ||
| }, | ||
| "id": "procedureOutcome", | ||
| "label": "Procedure outcome" | ||
| }, | ||
| { | ||
| "type": "obs", | ||
| "questionOptions": { | ||
| "rendering": "number", | ||
| "concept": "165929AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "min": "1", | ||
| "max": "100" | ||
Mwanje marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| "id": "procedureDuration", | ||
| "label": "Duration of procedure" | ||
Mwanje marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| { | ||
| "type": "obs", | ||
| "id": "durationUnit", | ||
Mwanje marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "label": "Duration units", | ||
Mwanje marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "questionOptions": { | ||
| "rendering": "select", | ||
| "concept": "1732AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "answers": [ | ||
Mwanje marked this conversation as resolved.
Show resolved
Hide resolved
Mwanje marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at the current duration units:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also think "Number of occurrences" is a completely separate question from "Duration". I.e., if I apply 3 bandages to a patient, that does need to be documented, but the procedure still took, say, 5 minutes regardless. |
||
| "concept": "1072AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Days" | ||
| }, | ||
| { | ||
| "concept": "1822AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Hours" | ||
| }, | ||
| { | ||
| "concept": "1733AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Minutes" | ||
| }, | ||
| { | ||
| "concept": "1074AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Months" | ||
| }, | ||
| { | ||
| "concept": "162582AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Number of occurrences" | ||
| }, | ||
| { | ||
| "concept": "162583AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Seconds" | ||
| }, | ||
| { | ||
| "concept": "1073AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Weeks" | ||
| }, | ||
| { | ||
| "concept": "1734AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "label": "Years" | ||
| } | ||
| ] | ||
| }, | ||
| "clearWhenExpression": "Number(procedureDuration) > 99 && (durationUnit === '1734AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')", | ||
Mwanje marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "validators": [ | ||
| { | ||
| "type": "js_expression", | ||
| "failsWhenExpression": "durationUnit === '1734AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' && Number(procedureDuration) > 99", | ||
| "message": "Duration cannot exceed 100 years.. Change unit or reduce duration." | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "type": "obs", | ||
| "questionOptions": { | ||
| "rendering": "textarea", | ||
| "concept": "160716AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
| "rows": 5 | ||
| }, | ||
| "id": "procedureComment", | ||
| "label": "Procedure comment" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "processor": "EncounterFormProcessor", | ||
| "encounter": "Procedure History", | ||
| "encounterType": "e22e39fd-7db2-45e7-80f1-60fa0d5a4378", | ||
| "referencedForms": [], | ||
| "uuid": "a2a125b6-62c5-4b5a-b86e-d252266d4b92", | ||
| "description": "Procedure History Form - used for documenting completed medical procedures", | ||
| "version": "1.0.0", | ||
| "published": true, | ||
| "retired": false | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the plan to eventually include all procedures from the collection as possible answers for this field so we end up with a complete procedure catalog instead of just 4 sample procedures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@denniskigen the plan is to include all procedures from the collection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this going to be done in this PR as well or we can do a follow PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an easier way we can maintain the set of answers here, e.g., by referring to a concept set or the existing concept answers? Inevitably for a real-world case this list will get long enough that maintaining it in JSON is likely impractical. @samuelmale Interested in your thoughts here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! The form-engine infers a field's answers from the associated concept if the
questionOptions.answersis empty. (Note that concept sets aren't supported)