Appearance
Form Template APIs
The following APIs are used by a wrapping application to dynamically decide which forms are available for use by users (with the correct permissions) and to provide complete structural and layout infomation of the a particular form template.
Discover what non-persisted style form templates are available (published)
Route: GET /{tenantId}/SinglePass/AvailableFormsDescription: Returns a list of forms that are marked as production Example: /TEST01/SinglePass/AvailableForms
Response
json
[
{
"name": "FGD Symptom Evaluation",
"key": "fgd-symptom-evaluation",
"versions": [
1,
2
]
},
{
"name": "Patient Dental Smile Assessment",
"key": "dental-smile-assessment",
"versions": [
1
]
}
...
]Discover what persisted form style templates are available (latest version and published)
Route: GET /api/clinicianforms/availableForms (Requires authentication) Description: Returns a list of forms limited to the latest creatable version that are marked as production (by default)
Response
json
[
{
"key": "vte",
"title": "VTE Risk Assessment",
"classification": "Observation"
},
{
"key": "eolc",
"title": "End of Life Care Plan",
"classification": "Plans"
}
...
]Discover what persisted form style templates are available (published)
Route: GET /api/clinicianforms/allAvailableFormsDescription: Returns a list of forms that are marked as production (by default)
Response
json
[
{
"key": "eolc",
"versionNumber": 2,
"formTitle": "End of life care",
"allowAmend": false,
"classification": "Uncategorised",
"allowSaveDraft": true,
"autoSaveIntervalSeconds": 30,
"allowDiscard": false,
"allowRevoke": true
},
{
"key": "eolc",
"versionNumber": 1,
"formTitle": "End of life care",
"allowAmend": false,
"classification": "Uncategorised",
"allowSaveDraft": true,
"autoSaveIntervalSeconds": 30,
"allowDiscard": false,
"allowRevoke": true
}
]Get details about a form template
Route: GET /api/v2.0/tenant/{tenantKey}/formdefinition/{formKey}/{formVersion}
Description: Returns a JSON based representation of the entire form.
Example: /api/v2.0/tenant/demo/formdefinition/bmi-reporting/1
Response
json
{
"key": "bmi-reporting",
"version": 1,
"title": "BMI Reporting",
"allowAmend": false,
"classification": "Uncategorised",
"allowSaveDraft": true,
"autoSaveInteval": 30,
"allowDiscard": false,
"allowRevoke": false,
"buildingBlocks": [
{
"key": "reporting-bmi",
"version": 1,
"xPath": "ReportingBmi",
"sections": [
{
"id": "Section_weight_and_Height",
"xPath": "Section_weight_and_Height",
"controls": [
{
"id": "Unit_type",
"xPath": "Unit_type",
"dataType": "string",
"label": "Unit type",
"hint": "",
"couldHaveValue": true,
"couldHaveMultipleValues": false,
"displayNameXPath": "@displayName",
"otherValueXPath": null
},
{
"id": "Height_meters",
"xPath": "Height_meters",
"dataType": "decimal",
"label": "Height (m)",
"hint": "Height in meters - e.g. 1.81",
"couldHaveValue": true,
"couldHaveMultipleValues": false,
"displayNameXPath": null,
"otherValueXPath": null
},
{
"id": "Height_feet",
"xPath": "Height_feet",
"dataType": "decimal",
"label": "Height (feet)",
"hint": "e.g. 5",
"couldHaveValue": true,
"couldHaveMultipleValues": false,
"displayNameXPath": null,
"otherValueXPath": null
},
{
"id": "Height_inches",
"xPath": "Height_inches",
"dataType": "decimal",
"label": "Height (inches)",
"hint": "e.g. 11 or 11.25",
"couldHaveValue": true,
"couldHaveMultipleValues": false,
"displayNameXPath": null,
"otherValueXPath": null
},
{
"id": "Weight_kg",
"xPath": "Weight_kg",
"dataType": "decimal",
"label": "Weight (kg)",
"hint": "",
"couldHaveValue": true,
"couldHaveMultipleValues": false,
"displayNameXPath": null,
"otherValueXPath": null
},
{
"id": "Weight_pounds",
"xPath": "Weight_pounds",
"dataType": "decimal",
"label": "Weight (pounds)",
"hint": "",
"couldHaveValue": true,
"couldHaveMultipleValues": false,
"displayNameXPath": null,
"otherValueXPath": null
}
],
"repeats": []
},
{
"id": "Section_BMI",
"xPath": "Section_BMI",
"controls": [
{
"id": "BMI",
"xPath": "BMI",
"dataType": "decimal",
"label": "BMI",
"hint": "",
"couldHaveValue": true,
"couldHaveMultipleValues": false,
"displayNameXPath": null,
"otherValueXPath": null
},
{
"id": "Weight_appropriate",
"xPath": "Weight_appropriate",
"dataType": "string",
"label": "Weight appropriate",
"hint": "",
"couldHaveValue": true,
"couldHaveMultipleValues": false,
"displayNameXPath": null,
"otherValueXPath": null
}
],
"repeats": []
}
]
}
]
}Get details about the Un-persisted data format (when used in conjunction with a Delivery Channel)
Route: GET /api/v2.0/tenant/{tenantKey}/formschema/{formKey}/{version}
Description: Returns an auto generated XML Schema showing the structure of data that would be sent via the un-persisted forms delivery channel
Example: /api/v2.0/tenant/demo/formschema/form-invite/1
Response
xml
<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:simpleType name="xf-decimal">
<xsd:union>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="0" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType>
<xsd:restriction base="xsd:decimal" />
</xsd:simpleType>
</xsd:union>
</xsd:simpleType>
<xsd:simpleType name="xf-integer">
<xsd:union>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="0" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType>
<xsd:restriction base="xsd:integer" />
</xsd:simpleType>
</xsd:union>
</xsd:simpleType>
...
<xsd:element name="PatientForm">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="GenericFormInviteLauncherPreamble">
<xsd:complexType>
<xsd:sequence minOccurs="0">
<xsd:element name="InvitePreamble">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Preamble" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="templateId" type="xsd:string" use="optional" />
</xsd:complexType>
</xsd:element>
...
</xsd:sequence>
<xsd:attribute name="token" type="xsd:string" use="optional" />
<xsd:attribute name="transaction-id" type="xsd:string" use="optional" />
</xsd:complexType>
</xsd:element>
</xsd:schema>