Skip to content

Instantly share code, notes, and snippets.

@mhawila
Created August 11, 2016 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhawila/09b67d115d5c1269213042dfa7b99874 to your computer and use it in GitHub Desktop.
Save mhawila/09b67d115d5c1269213042dfa7b99874 to your computer and use it in GitHub Desktop.
This is how the form json schema with components looks like. You need to define all referenced components in referenced Section and use an alias in the field definition
{
"name": "AMPATH POC Adult Return",
"uuid": "xxxx",
"processor": "EncounterFormProcessor",
"referencedForms": [
{
"ref": {
"uuid": "36dabf20-89a7-41ba-a358-246ba7cf120a",
"display": "Pre Clinic Review Component"
},
"alias": "pcr"
},
{
"ref": {
"uuid": "0e048527-7b32-4807-9876-ce827120f1ee",
"display": "Hospitalization Component"
},
"alias": "hosp"
},
{
"ref": {
"uuid": "992cc76c-5a6f-4065-9e30-665f91f2a454",
"display": "ART Component"
},
"alias": "art"
},
{
"ref": {
"uuid": "d3e4ad24-1188-4426-b855-ee658993ec03",
"display": "PCP Prophylaxis Component"
},
"alias": "pcp"
},
{
"ref": {
"uuid": "0602aacc-e797-4d26-a9e9-1556f012d46f",
"display": "TB Prophylaxis Component"
},
"alias": "tbp"
},
{
"ref": {
"uuid": "19b6f27b-66b0-4900-9ade-b2288284e5ed",
"display": "TB Treatment Component"
},
"alias": "tbt"
},
{
"ref": {
"uuid": "f5f5e3a8-3932-409a-b004-1327e85b3aeb",
"display": "Other Medication Component"
},
"alias": "omed"
},
{
"ref": {
"uuid": "8dac57da-c361-4b25-8b7d-e9d15f0de3a6",
"display": "Crypto Component"
},
"alias": "cryp"
},
{
"ref": {
"uuid": "a789ac5f-4193-4134-8aa5-51674f4b40be",
"display": "Side Effect Component"
},
"alias": "se"
},
{
"ref": {
"uuid": "8f741de0-6dba-4994-86d5-ddc7a41cfb74",
"display": "Vitals Component"
},
"alias": "vt"
},
{
"ref": {
"uuid": "86b7dbdb-8cd3-4f9d-a153-d39e3e05717e",
"display": "HPI Component"
},
"alias": "hpi"
},
{
"ref": {
"uuid": "fc2231a7-ede6-42e2-9330-0bc7ed687d46",
"display": "Problem List Component"
},
"alias": "pl"
},
{
"ref": {
"uuid": "0ca17b59-e0e6-4280-9b50-d75847ecac9e",
"display": "Who Staging Component"
},
"alias": "who"
},
{
"ref": {
"uuid": "bbf06310-1023-4768-a7f7-8b4a9d69ab9e",
"display": "Lab Results Component"
},
"alias": "tr"
},
{
"ref": {
"uuid": "c02a1e45-eb1a-4890-b3f9-3f29697176ce",
"display": "Assessment Component"
},
"alias": "ass"
},
{
"ref": {
"uuid": "812a7e5e-4e3d-4f57-b2db-1ee60b6d4e68",
"display": "OB History Component"
},
"alias": "gynhist"
},
{
"ref": {
"uuid": "7372d1e2-eb4b-4b67-801b-a8b88832529b",
"display": "Lab Orders Component"
},
"alias": "to"
},
{
"ref": {
"uuid": "0319de01-75ea-4b23-b8f6-eb6265a110c1",
"display": "Referral Component"
},
"alias": "ref"
},
{
"ref": {
"uuid": "c3f4236c-dbb5-4f8e-87eb-5c7b73f5cf94",
"display": "VL Justification Component"
},
"alias": "vljust"
}
],
"pages": [
{
"label": "Encounter Details",
"sections": [
{
"label": "Encounter Details",
"isExpanded": "True",
"questions": [
{
"label": "Visit date",
"type": "encounterDatetime",
"required": "true",
"default": "",
"id": "encDate",
"questionOptions": {
"rendering": "date"
},
"validators": [
{
"type": "date"
}
]
},
{
"type": "encounterProvider",
"label": "Provider",
"id": "provider",
"required": "true",
"default": "",
"questionOptions": {
"rendering": "ui-select-extended"
}
},
{
"type": "encounterLocation",
"label": "Facility name (site/satellite clinic required):",
"id": "location",
"required": "true",
"questionOptions": {
"rendering": "ui-select-extended"
}
}
]
}
]
},
{
"label": "Pre-Clinic Review",
"sections": [
{
"reference": {
"form": "pcr",
"page": "Pre-clinic Review",
"section": "Pre-clinic Review"
}
}
]
},
{
"label": "Medical History",
"sections": [
{
"reference": {
"form": "pcr",
"page": "Pre-clinic Review",
"section": "Social History"
}
},
{
"reference": {
"form": "pcr",
"page": "Pre-clinic Review",
"section": "Prevention With Positives"
}
},
{
"reference": {
"form": "hosp",
"page": "Hospitalization",
"section": "Hospitalization History"
}
},
{
"reference": {
"form": "gynhist",
"page": "OB/Gyn History",
"section": "OB/Gyn History",
"excludeQuestions": [
"deliveryDate"
]
}
}
]
},
{
"label": "ART History",
"sections": [
{
"reference": {
"form": "art",
"page": "ART ",
"section": "ART History",
"excludeQuestions": [
"current_art_regimen_ped"
]
}
}
]
},
{
"label": "PCP & TB Prophylaxis History",
"sections": [
{
"reference": {
"form": "pcp",
"page": "PCP Prophylaxis",
"section": "PCP Prophylaxis Current"
}
},
{
"reference": {
"form": "tbp",
"page": "TB Prophylaxis",
"section": "TB Prophylaxis Current"
}
}
]
},
{
"label": "TB History",
"sections": [
{
"reference": {
"form": "tbt",
"page": "TB Treatment",
"section": "Tuberculosis History"
}
}
]
},
{
"label": "Other Medications History",
"sections": [
{
"reference": {
"form": "cryp",
"page": "Cryptococcal prevention",
"section": "Cryptococcal Secondary Prevention"
}
},
{
"reference": {
"form": "omed",
"page": "Other medication",
"section": "Other Medications"
}
}
]
},
{
"label": "Med Side Effects",
"sections": [
{
"reference": {
"form": "se",
"page": "Side Effects/Toxicity",
"section": "Side Effects/Toxicity"
}
}
]
},
{
"label": "Vitals",
"sections": [
{
"reference": {
"form": "vt",
"page": "Vitals",
"section": "Vital Signs"
}
}
]
},
{
"label": "CC/HPI",
"sections": [
{
"reference": {
"form": "hpi",
"page": "History presenting illness",
"section": "History Presenting Illness, Notes"
}
}
]
},
{
"label": "Current Symptoms",
"sections": [
{
"reference": {
"form": "pl",
"page": "Problem list",
"section": "Problem List"
}
},
{
"reference": {
"form": "tbt",
"page": "TB Treatment",
"section": "TB Screening Questions"
}
},
{
"reference": {
"form": "gynhist",
"page": "OB/Gyn History",
"section": "STI"
}
},
{
"reference": {
"form": "who",
"page": "WHO staging",
"section": "Adult WHO Staging"
}
}
]
},
{
"label": "Test Results",
"sections": [
{
"reference": {
"form": "tr",
"page": "Test Results",
"section": "Chemistry Lab Tests"
}
},
{
"reference": {
"form": "tr",
"page": "Test Results",
"section": "CBC"
}
},
{
"reference": {
"form": "tr",
"page": "Test Results",
"section": "CD4"
}
},
{
"reference": {
"form": "tr",
"page": "Test Results",
"section": "Viral Load"
}
},
{
"reference": {
"form": "tr",
"page": "Test Results",
"section": "TB Test"
}
},
{
"reference": {
"form": "tr",
"page": "Test Results",
"section": "Chest Xray"
}
}
]
},
{
"label": "Assessment",
"sections": [
{
"reference": {
"form": "ass",
"page": "Assessment",
"section": "Assessment Notes"
}
}
]
},
{
"label": "Medication Plan",
"sections": [
{
"reference": {
"form": "art",
"page": "ART ",
"section": "ART Plan",
"excludeQuestions": [
"artStartedPed"
]
}
},
{
"reference": {
"form": "pcp",
"page": "PCP Prophylaxis",
"section": "PCP Prophylaxis Plan"
}
},
{
"reference": {
"form": "tbp",
"page": "TB Prophylaxis",
"section": "TB Prophylaxis Plan"
}
},
{
"reference": {
"form": "tbt",
"page": "TB Treatment",
"section": "TB Treatment Plan"
}
},
{
"reference": {
"form": "cryp",
"page": "Cryptococcal prevention",
"section": "Cryptococcal Treatment Plan"
}
},
{
"reference": {
"form": "omed",
"page": "Other medication",
"section": "Additional Medication Orders"
}
}
]
},
{
"label": "Plan",
"sections": [
{
"reference": {
"form": "to",
"page": "Test orders",
"section": "Test Orders"
}
},
{
"reference": {
"form": "ref",
"page": "Referrals",
"section": "Referrals"
}
},
{
"label": "Next appointment",
"isExpanded": "true",
"questions": [
{
"label": "Return to clinic Date:",
"type": "obs",
"required": "true",
"questionOptions": {
"concept": "a8a666ba-1350-11df-a1f1-0026b9348838",
"rendering": "date",
"weeksList": [
2,
4,
8,
12,
16
]
},
"validators": [
{
"type": "date",
"allowFutureDates": "true"
}
]
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment