QuestionnaireViewModel
Constructors
Properties
Functions
Adds Resource to Group.member if the member does not exist and if Resource.logicalId is NOT the same as the retrieved GroupResourceConfig.groupIdentifier (Cannot add a Group as member of itself.
This function generates CarePlans for the QuestionnaireResponse.subject using the configured QuestionnaireConfig.planDefinitions
This function performs data extraction against the QuestionnaireResponse. All the resources generated from a successful extraction by StructureMap or definition are stored in the database. The QuestionnaireResponse is also stored in the database regardless of the outcome of ResourceMapper.extract. This function will optionally generate CarePlan using the PlanDefinition resource configured in QuestionnaireConfig.planDefinitions. The QuestionnaireConfig.eventWorkflows contains configurations to cascade update the statuses of resources to in-active (close) that are related to the current QuestionnaireResponse.subject
Load Resource of type ResourceType for the provided resourceIdentifier
Perform StructureMap or Definition based definition. The result of this function returns a Bundle that contains the resources that were generated via the ResourceMapper.extract operation otherwise returns null if an exception is encountered.
Return Resources to be used in the launch context of the questionnaire. Launch context allows information to be passed into questionnaire based on the context in which the questionnaire is being evaluated. For example, what patient, what encounter, what user, etc. is "in context" at the time the questionnaire response is being completed: https://build.fhir.org/ig/HL7/sdc/StructureDefinition-sdc-questionnaire-launchContext.html
This function retrieves the Questionnaire as configured via the QuestionnaireConfig. The retrieved Questionnaire can then be pre-populated.
This function saves QuestionnaireResponse as draft if any of the QuestionnaireResponse.item has an answer.
This function searches and returns the latest QuestionnaireResponse for the given resourceId that was extracted from the Questionnaire identified as questionnaireId. Returns null if non is found.
Update the current progress state of the questionnaire.
This function triggers removal of Resource s as per the QuestionnaireConfig.groupResource or QuestionnaireConfig.removeResource config properties.
This function updates the _lastUpdated property of resources configured by the ActionParameter.paramType of ActionParameterType.UPDATE_DATE_ON_EDIT. Each time a questionnaire is submitted, the affected resources last modified/updated date will also be updated.
This function validates all QuestionnaireResponse and returns true if all the validation result of QuestionnaireResponseValidator are Valid or NotValidated (validation is optional on Questionnaire fields)