Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": [
Copy link
Member

@denniskigen denniskigen Sep 24, 2025

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?

Copy link
Author

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

Copy link

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

Copy link
Member

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.

Copy link
Member

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?

Yes! The form-engine infers a field's answers from the associated concept if the questionOptions.answers is empty. (Note that concept sets aren't supported)

{
"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",
"required": true
},
{
"type": "obs",
"questionOptions": {
"rendering": "datetime",
"concept": "160715AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
},
"id": "procedureDate",
"label": "Date/time procedure performed",
"datePickerFormat": "both",
"validators": [
{
"type": "date",
"allowFutureDates": "false"
}
]
},
{
"type": "obs",
"questionOptions": {
"rendering": "datetime",
"concept": "167132AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
},
"id": "procedureEndDate",
"label": "Procedure end date/time",
"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"
},
"id": "procedureDuration",
"label": "Duration of procedure"
},
{
"type": "obs",
"id": "durationUnit",
"label": "Duration units",
"questionOptions": {
"rendering": "select",
"concept": "1732AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"answers": [
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the current duration units:

  1. The ordering of units seems random. Could we order them logically (e.g., minutes, hours, days, weeks, months, years), either ascending or descending?
  2. The validation currently only blocks durations greater than 100 years. Should we consider unit-specific limits (e.g., prevent excessive values in hours or minutes when those units are selected)?
  3. Referring to this sample procedure list (~50 procedures):
    • Which time units are most relevant/commonly used for these procedures?
    • What's the optimal ordering for user experience?
    • Does the current validation logic fit typical use cases?
  4. Are months and years realistic for procedure duration tracking, or should we limit to shorter timeframes?

Copy link
Member

Choose a reason for hiding this comment

The 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')",
"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
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Uuid,Void/Retire,Name,Description,View privilege,Edit privilege,_order:1000
0e8230ce-bd1d-43f5-a863-cf44344fa4b0,,Adult Visit,Encounter for adult visit form,,,,
dd528487-82a5-4082-9c72-ed246bd49591,,Consultation,Consultation encounter,,,,
0e8230ce-bd1d-43f5-a863-cf44344fa4b0,,Adult Visit,Encounter for adult visit form,,,
dd528487-82a5-4082-9c72-ed246bd49591,,Consultation,Consultation encounter,,,
ca3aed11-1aa4-42a1-b85c-8332fc8001fc,,Check In,Indicates the patient has done the required paperwork and check-in to begin a visit to the clinic/hospital.,,,
67a71486-1a54-468f-ac3e-7091a9a79584,,Vitals,For capturing vital signs,,,
e22e39fd-7db2-45e7-80f1-60fa0d5a4378,,Admission,"Indicates that the patient has been admitted for inpatient care, and is not expected to leave the hospital unless discharged.",,,
Expand All @@ -17,4 +17,5 @@ d3b07384-8d1c-4e6b-9b8e-2f3b8e4a1c9f,,Transfer,Indicates that a patient is being
a1f5c3d2-4b6e-4e8a-9f2d-1b3e8e4a2d7f,,Inpatient Note,A short free-text note written by a clinician about an inpatient during their stay,,,
b2c4d5e6-7f8a-4e9b-8c1d-2e3f8e4a3b8f,,Transfer Request,A stand-alone encounter type for a transfer request not part of a larger note,,,
f47ac10b-58cc-4372-a567-0e02b2c3d479,,Bed Assignment,Assigning a new bed to a patient without admitting or transferring them,,,
550e8400-e29b-41d4-a716-446655440000,,Cancel ADT,An encounter that notes that a request to admit/transfer/discharge a patient is being overridden,,,
550e8400-e29b-41d4-a716-446655440000,,Cancel ADT,An encounter that notes that a request to admit/transfer/discharge a patient is being overridden,,,
6f8393e7-cf3d-45e1-abc1-d83858a18d8c,,Procedure History,Encounter for documenting completed medical procedures,,,
Binary file not shown.