Tiro.health Form SDK

Tiro.health's Form SDK backend is a set of services that enable you to integrate form response processing into your healthcare information system. It provides a FHIR-based API for

  • Retrieving and search Questionnaire resources
  • Creating an initial QuestionnaireResponse based on the configuration specified in a Questionnaire resource
  • Validating QuestionnaireResponses against the Questionnaire resource
  • Generating narrative text based for a QuestionnaireResponse
  • Expanding ValueSets for use in Questionnaire items

These FHIR API's are conformant to the SDC Implementation Guide, which is a set of FHIR profiles and extensions that define how to create and manage forms and form responses in healthcare systems.

Docker Registry

The docker images for the Tiro.health Form SDK backend services are available on Google Cloud Artifact Registry at europe-docker.pkg.dev/tiroapp-4cb17/docker-ext.

Once you have been provided with a service account, you can authenticate and pull the images using the following steps:

  1. Configure Docker to use the gcloud command-line tool as a credential helper:

    gcloud auth configure-docker europe-docker.pkg.dev
    
  2. Pull the desired image:

    docker pull europe-docker.pkg.dev/tiroapp-4cb17/docker-ext/form-sdk-backend:latest
    

Make sure you have authenticated with your service account credentials before attempting to pull the images.


POST/Questionnaire/$populate

Form Population Service

This endpoint allows you to create an initial QuestionnaireResponse based on the configuration specified in a Questionnaire resource. It is typically used to pre-fill a form with data from the patient record or other sources.

The service accepts context information to pre-populate fields with data on the subject, encounter or other context related resources.

[!NOTE] The specification for this endpoint is defined in the SDC Implementation Guide. It is a part of the SDC (Structured Data Capture) standard, which is used to create and manage forms and form responses in healthcare applications.

Example context information:

NameContentDescription
subjectPatientThe patient resource to pre-populate the form with.
encounterEncounterThe encounter resource to pre-populate the form with.
userDevice, PractitionerRole, Practitioner, RelatedPerson, Organization or PatientThe practitioner resource to pre-populate the form with.
clinical*Indicates the current clinical resource being manipulated or reviewed by the user launching the Questionnaire.

This endpoint allows you to create an initial QuestionnaireResponse based on the configuration specified in a Questionnaire resource. It is typically used to pre-fill a form with data from the patient record or other sources.

Request

POST
/Questionnaire/$populate
curl -X POST https://{SDK_BACKEND_ADDRESS}/Questionnaire/$populate \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "resourceType": "Parameters",
    "parameter": [{
      "name": "questionnaire",
      "resource": {
        "resourceType": "Questionnaire",
        // ... Questionnaire resource here
      }
    }, {
      "name": "context",
      "part": [
        {
            "name": "name"
            "valueString": "subject"
        },
        {
            "name": "content"
            "resource": {
                "resourceType": "Patient",
                "identifier": [{
                    "system": "http://example.com/mrn",
                    "value": "12345"
                }],
                "name": [{
                    "given": ["John"],
                    "family": "Doe"
                }],
            }

        }
      ]
    }]
  }'

POST/QuestionnaireResponse/$validate

Form Validation Service

This endpoint allows you to validate a QuestionnaireResponse against the Questionnaire resource. It checks if the response is valid according to the rules defined in the Questionnaire, such as required fields, value types, and constraints.

This endpoint allows you to validate a QuestionnaireResponse against the Questionnaire resource. It checks if the response is valid according to the rules defined in the Questionnaire, such as required fields, value types, and constraints.

Request

POST
/QuestionnaireResponse/$validate
curl -X POST https://{SDK_BACKEND_ADDRESS}/QuestionnaireResponse/$validate \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "resourceType": "QuestionnaireResponse",
    "questionnaire": "https://example.com/Questionnaire/123",
    "status": "in-progress",
    "item": [{
        "linkId": "1",
        "text": "Patient Name",
        "answer": [{
            "valueString": "John Doe"
         }]
        // ... other items here
     }],
    }
  }'

POST/QuestionnaireResponse/$generate-narrative

Text Narrative Generation Service

This endpoint allows you to generate a human readable narrative for a QuestionnaireResponse. It follows the configuration specified in the Questionnnaire and the data in the QuestionnaireResponse to create a narrative text that summarizes the information captured in the form.

This endpoint allows you to generate a human readable narrative for a QuestionnaireResponse. It follows the configuration specified in the Questionnnaire and the data in the QuestionnaireResponse to create a narrative text that summarizes the information captured in the form.

Request

POST
/QuestionnaireResponse/$generate-narrative
curl -X POST https://{SDK_BACKEND_ADDRESS}/QuestionnaireResponse/$generate-narrative \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "resourceType": "QuestionnaireResponse",
    "questionnaire": "https://example.com/Questionnaire/123",
    "status": "completed",
    "item": [{
        "linkId": "1",
        "text": "Patient Name",
        "answer": [{
            "valueString": "John Doe"
         }]
        // ... other items here
     }],
    }
  }'

Was this page helpful?