2.7.0 - STU 3 (2nd ballot)

This page is part of the Structured Data Capture FHIR IG (v2.7.0: STU 3 Ballot 2) based on FHIR R4. The current version which supercedes this version is 3.0.0. For a full list of available versions, see the Directory of published versions

Populate Questionnaire - TTL Representation

(back to narrative)

Raw ttl

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:OperationDefinition;
  fhir:nodeRole fhir:treeRoot;
  fhir:Resource.id [ fhir:value "Questionnaire-populate"];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ];
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h2>PopulateQuestionnaire</h2><p>OPERATION: PopulateQuestionnaire</p><p>The official URL for this operation definition is: </p><pre>http://hl7.org/fhir/uv/sdc/OperationDefinition/Questionnaire-populate</pre><div><p>Generates a <a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\">QuestionnaireResponse</a> instance  based on a specified <a href=\"http://hl7.org/fhir/R4/questionnaire.html\">Questionnaire</a>, filling in answers to questions where possible based on information provided as part of the operation or already known by the server about the subject of the <a href=\"http://hl7.org/fhir/R4/questionnaire.html\">Questionnaire</a>.  If the operation is not called at the instance level, one and only one of the identifier, questionnaire or questionnaireRef <code>in</code> parameters must be provided. If called at the instance level, these parameters will be ignored.  The response will contain a <a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\">QuestionnaireResponse</a> instance based on the specified <a href=\"http://hl7.org/fhir/R4/questionnaire.html\">Questionnaire</a> and/or an <a href=\"http://hl7.org/fhir/R4/operationoutcome.html\">OperationOutcome</a> resource with errors or warnings.  The <a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\">QuestionnaireResponse</a> instance will be populated with an unanswered set of questions following the group and question structure of the specified <a href=\"http://hl7.org/fhir/R4/questionnaire.html\">Questionnaire</a>.  If  <em>content</em> parameters were specified or the <em>local</em> parameter was set to true, some of the questions may have answers filled in as well.  In the case of repeating questions or groups, typically only one repetition will be provided unless answer values exist that would support populating multiple repetitions.  Population of the <a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\">QuestionnaireResponse</a> with appropriate data is dependent on the questions and/or groups in the <a href=\"http://hl7.org/fhir/R4/questionnaire.html\">Questionnaire</a> having metadata that allows the server to recognize the questions.  Guidance on mechanisms to perform population can be found <a href=\"populate.html\">here</a>.  Regardless of the mechanism used to link the questions in a questionnaire to a &quot;known&quot; mappable concept, solutions using this operation should ensure that the details of the question and associated linkage element are sufficiently similar as to safely allow auto-population; i.e. the question text and context must be sufficiently the same, the value set for the question must fall within the value set for the mapped element, the data types must be the same or convertible, etc.</p>\n</div><p>URL: [base]/Questionnaire/$populate</p><p>URL: [base]/Questionnaire/[id]/$populate</p><p>Parameters</p><table class=\"grid\"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>identifier</td><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#uri\">uri</a></td><td/><td><div><p>A logical questionnaire identifier (i.e. <code>Questionnaire.identifier</code>). The server must know the questionnaire or be able to retrieve it from other known repositories.</p>\n</div></td></tr><tr><td>IN</td><td>questionnaire</td><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/questionnaire.html\">Questionnaire</a></td><td/><td><div><p>The <a href=\"http://hl7.org/fhir/R4/questionnaire.html\">Questionnaire</a> is provided directly as part of the request. Servers may choose not to accept questionnaires in this fashion</p>\n</div></td></tr><tr><td>IN</td><td>questionnaireRef</td><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Reference\">Reference</a></td><td/><td><div><p>The <a href=\"http://hl7.org/fhir/R4/questionnaire.html\">Questionnaire</a> is provided as a resource reference. Servers may choose not to accept questionnaires in this fashion or may fail if they cannot resolve or access the referenced questionnaire.</p>\n</div></td></tr><tr><td>IN</td><td>subject</td><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Reference\">Reference</a></td><td/><td><div><p>The resource that is to be the <em>QuestionnaireResponse.subject</em>. The <a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\">QuestionnaireResponse</a> instance will reference the provided subject.  In addition, if the <em>local</em> parameter is set to true, server information about the specified subject will be used to populate the instance.</p>\n</div></td></tr><tr><td>IN</td><td>content</td><td>0..*</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Reference\">Reference</a></td><td/><td><div><p>Resources containing information to be used to help populate the <a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\">QuestionnaireResponse</a>.  These may be FHIR resources or may be binaries containing FHIR documents, CDA documents or other source materials.  Servers might not support all possible source materials and may ignore materials they do not recognize.  (They MAY provide warnings if ignoring submitted resources.)</p>\n</div></td></tr><tr><td>IN</td><td>local</td><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#boolean\">boolean</a></td><td/><td><div><p>If specified and set to <code>true</code> (and the server is capable), the server should use what resources and other knowledge it has about the referenced subject when pre-populating answers to questions.</p>\n</div></td></tr><tr><td>OUT</td><td>questionnaire</td><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\">QuestionnaireResponse</a></td><td/><td><div><p>The partially (or fully)-populated set of answers for the specified Questionnaire</p>\n</div></td></tr><tr><td>OUT</td><td>issues</td><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/operationoutcome.html\">OperationOutcome</a></td><td/><td><div><p>A list of hints and warnings about problems encountered while populating the questionnaire. These might be show to the user as an advisory note. Note: if the questionnaire cannot be populated at all, then the operation should fail, and an OperationOutcome is returned directly with the failure, rather than using this parameter</p>\n</div></td></tr></table><div><p>While it is theoretically possible for a <a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\">QuestionnaireResponse</a> instance to be completely auto-populated and submitted without human review, the intention of this transaction is merely to reduce redundant data entry.  A client <strong>SHOULD</strong> ensure that a human submitter has an opportunity to review the auto-populated answers to confirm correctness as well as to complete or expand on information provided by the auto-population process.  When creating an &quot;empty&quot; questionnaire, the general algorithm is to create a QuestionnaireResponse with one item for every item in the source Questionnaire, including items with &quot;enableWhen&quot;, &quot;display&quot; items, etc.  If a question has a default, the default answer should be populated.  And the QuestionnaireResponse should point back to the originating Questionnaire.  Repeating items will typically only include a single repetition.  Other extensions and/or elements may also be populated if the system is aware of appropriate values.  Complex form designs with conditional logic or tight constraints on cardinalities may be challenging to auto-populate.  A server MAY choose to traverse the questionnaire as if it were a human respondent, answering only those questions that are enabled based on previously answered questions.  However, doing so may result in minimal population.  Alternatively, systems may choose to populate all known answers, independent of dependencies and other constraints.  This may cause questions to be answered that should not be answered.  It will be up to the client to appropriately prune the final populated questionnaire once human review has taken place.  Invoking this operation with the <code>content</code> parameter may involve the disclosure of personally identifiable healthcare information to the system which is performing the population process.  No such disclosures should be made unless the system on which the operation is being invoked is a &quot;trusted&quot; system and appropriate agreements are in place to protect the confidentiality of any information shared with that system.</p>\n</div></div>"
  ];
  fhir:OperationDefinition.url [ fhir:value "http://hl7.org/fhir/uv/sdc/OperationDefinition/Questionnaire-populate"];
  fhir:OperationDefinition.version [ fhir:value "2.7.0"];
  fhir:OperationDefinition.name [ fhir:value "PopulateQuestionnaire"];
  fhir:OperationDefinition.title [ fhir:value "Populate Questionnaire"];
  fhir:OperationDefinition.status [ fhir:value "draft"];
  fhir:OperationDefinition.kind [ fhir:value "operation"];
  fhir:OperationDefinition.date [ fhir:value "2018-08-19T21:48:56+10:00"^^xsd:dateTime];
  fhir:OperationDefinition.publisher [ fhir:value "HL7 International - FHIR Infrastructure Work Group"];
  fhir:OperationDefinition.contact [
     fhir:index 0;
     fhir:ContactDetail.telecom [
       fhir:index 0;
       fhir:ContactPoint.system [ fhir:value "other" ];
       fhir:ContactPoint.value [ fhir:value "http://www.hl7.org/Special/committees/fiwg" ]     ]
  ];
  fhir:OperationDefinition.description [ fhir:value "Generates a [QuestionnaireResponse](http://hl7.org/fhir/R4/questionnaireresponse.html) instance  based on a specified [Questionnaire](http://hl7.org/fhir/R4/questionnaire.html), filling in answers to questions where possible based on information provided as part of the operation or already known by the server about the subject of the [Questionnaire](http://hl7.org/fhir/R4/questionnaire.html).  If the operation is not called at the instance level, one and only one of the identifier, questionnaire or questionnaireRef `in` parameters must be provided. If called at the instance level, these parameters will be ignored.  The response will contain a [QuestionnaireResponse](http://hl7.org/fhir/R4/questionnaireresponse.html) instance based on the specified [Questionnaire](http://hl7.org/fhir/R4/questionnaire.html) and/or an [OperationOutcome](http://hl7.org/fhir/R4/operationoutcome.html) resource with errors or warnings.  The [QuestionnaireResponse](http://hl7.org/fhir/R4/questionnaireresponse.html) instance will be populated with an unanswered set of questions following the group and question structure of the specified [Questionnaire](http://hl7.org/fhir/R4/questionnaire.html).  If  *content* parameters were specified or the *local* parameter was set to true, some of the questions may have answers filled in as well.  In the case of repeating questions or groups, typically only one repetition will be provided unless answer values exist that would support populating multiple repetitions.  Population of the [QuestionnaireResponse](http://hl7.org/fhir/R4/questionnaireresponse.html) with appropriate data is dependent on the questions and/or groups in the [Questionnaire](http://hl7.org/fhir/R4/questionnaire.html) having metadata that allows the server to recognize the questions.  Guidance on mechanisms to perform population can be found [here](populate.html).  Regardless of the mechanism used to link the questions in a questionnaire to a \"known\" mappable concept, solutions using this operation should ensure that the details of the question and associated linkage element are sufficiently similar as to safely allow auto-population; i.e. the question text and context must be sufficiently the same, the value set for the question must fall within the value set for the mapped element, the data types must be the same or convertible, etc."];
  fhir:OperationDefinition.code [ fhir:value "populate"];
  fhir:OperationDefinition.comment [ fhir:value "While it is theoretically possible for a [QuestionnaireResponse](http://hl7.org/fhir/R4/questionnaireresponse.html) instance to be completely auto-populated and submitted without human review, the intention of this transaction is merely to reduce redundant data entry.  A client **SHOULD** ensure that a human submitter has an opportunity to review the auto-populated answers to confirm correctness as well as to complete or expand on information provided by the auto-population process.  When creating an \"empty\" questionnaire, the general algorithm is to create a QuestionnaireResponse with one item for every item in the source Questionnaire, including items with \"enableWhen\", \"display\" items, etc.  If a question has a default, the default answer should be populated.  And the QuestionnaireResponse should point back to the originating Questionnaire.  Repeating items will typically only include a single repetition.  Other extensions and/or elements may also be populated if the system is aware of appropriate values.  Complex form designs with conditional logic or tight constraints on cardinalities may be challenging to auto-populate.  A server MAY choose to traverse the questionnaire as if it were a human respondent, answering only those questions that are enabled based on previously answered questions.  However, doing so may result in minimal population.  Alternatively, systems may choose to populate all known answers, independent of dependencies and other constraints.  This may cause questions to be answered that should not be answered.  It will be up to the client to appropriately prune the final populated questionnaire once human review has taken place.  Invoking this operation with the `content` parameter may involve the disclosure of personally identifiable healthcare information to the system which is performing the population process.  No such disclosures should be made unless the system on which the operation is being invoked is a \"trusted\" system and appropriate agreements are in place to protect the confidentiality of any information shared with that system."];
  fhir:OperationDefinition.resource [
     fhir:value "Questionnaire";
     fhir:index 0
  ];
  fhir:OperationDefinition.system [ fhir:value "false"^^xsd:boolean];
  fhir:OperationDefinition.type [ fhir:value "true"^^xsd:boolean];
  fhir:OperationDefinition.instance [ fhir:value "true"^^xsd:boolean];
  fhir:OperationDefinition.parameter [
     fhir:index 0;
     fhir:OperationDefinition.parameter.name [ fhir:value "identifier" ];
     fhir:OperationDefinition.parameter.use [ fhir:value "in" ];
     fhir:OperationDefinition.parameter.min [ fhir:value "0"^^xsd:integer ];
     fhir:OperationDefinition.parameter.max [ fhir:value "1" ];
     fhir:OperationDefinition.parameter.documentation [ fhir:value "A logical questionnaire identifier (i.e. `Questionnaire.identifier`). The server must know the questionnaire or be able to retrieve it from other known repositories." ];
     fhir:OperationDefinition.parameter.type [ fhir:value "uri" ]
  ], [
     fhir:index 1;
     fhir:OperationDefinition.parameter.name [ fhir:value "questionnaire" ];
     fhir:OperationDefinition.parameter.use [ fhir:value "in" ];
     fhir:OperationDefinition.parameter.min [ fhir:value "0"^^xsd:integer ];
     fhir:OperationDefinition.parameter.max [ fhir:value "1" ];
     fhir:OperationDefinition.parameter.documentation [ fhir:value "The [Questionnaire](http://hl7.org/fhir/R4/questionnaire.html) is provided directly as part of the request. Servers may choose not to accept questionnaires in this fashion" ];
     fhir:OperationDefinition.parameter.type [ fhir:value "Questionnaire" ]
  ], [
     fhir:index 2;
     fhir:OperationDefinition.parameter.name [ fhir:value "questionnaireRef" ];
     fhir:OperationDefinition.parameter.use [ fhir:value "in" ];
     fhir:OperationDefinition.parameter.min [ fhir:value "0"^^xsd:integer ];
     fhir:OperationDefinition.parameter.max [ fhir:value "1" ];
     fhir:OperationDefinition.parameter.documentation [ fhir:value "The [Questionnaire](http://hl7.org/fhir/R4/questionnaire.html) is provided as a resource reference. Servers may choose not to accept questionnaires in this fashion or may fail if they cannot resolve or access the referenced questionnaire." ];
     fhir:OperationDefinition.parameter.type [ fhir:value "Reference" ];
     fhir:OperationDefinition.parameter.targetProfile [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Questionnaire";
       fhir:index 0;
       fhir:link <http://hl7.org/fhir/StructureDefinition/Questionnaire>     ]
  ], [
     fhir:index 3;
     fhir:OperationDefinition.parameter.name [ fhir:value "subject" ];
     fhir:OperationDefinition.parameter.use [ fhir:value "in" ];
     fhir:OperationDefinition.parameter.min [ fhir:value "1"^^xsd:integer ];
     fhir:OperationDefinition.parameter.max [ fhir:value "1" ];
     fhir:OperationDefinition.parameter.documentation [ fhir:value "The resource that is to be the *QuestionnaireResponse.subject*. The [QuestionnaireResponse](http://hl7.org/fhir/R4/questionnaireresponse.html) instance will reference the provided subject.  In addition, if the *local* parameter is set to true, server information about the specified subject will be used to populate the instance." ];
     fhir:OperationDefinition.parameter.type [ fhir:value "Reference" ]
  ], [
     fhir:index 4;
     fhir:OperationDefinition.parameter.name [ fhir:value "content" ];
     fhir:OperationDefinition.parameter.use [ fhir:value "in" ];
     fhir:OperationDefinition.parameter.min [ fhir:value "0"^^xsd:integer ];
     fhir:OperationDefinition.parameter.max [ fhir:value "*" ];
     fhir:OperationDefinition.parameter.documentation [ fhir:value "Resources containing information to be used to help populate the [QuestionnaireResponse](http://hl7.org/fhir/R4/questionnaireresponse.html).  These may be FHIR resources or may be binaries containing FHIR documents, CDA documents or other source materials.  Servers might not support all possible source materials and may ignore materials they do not recognize.  (They MAY provide warnings if ignoring submitted resources.)" ];
     fhir:OperationDefinition.parameter.type [ fhir:value "Reference" ]
  ], [
     fhir:index 5;
     fhir:OperationDefinition.parameter.name [ fhir:value "local" ];
     fhir:OperationDefinition.parameter.use [ fhir:value "in" ];
     fhir:OperationDefinition.parameter.min [ fhir:value "0"^^xsd:integer ];
     fhir:OperationDefinition.parameter.max [ fhir:value "1" ];
     fhir:OperationDefinition.parameter.documentation [ fhir:value "If specified and set to `true` (and the server is capable), the server should use what resources and other knowledge it has about the referenced subject when pre-populating answers to questions." ];
     fhir:OperationDefinition.parameter.type [ fhir:value "boolean" ]
  ], [
     fhir:index 6;
     fhir:OperationDefinition.parameter.name [ fhir:value "questionnaire" ];
     fhir:OperationDefinition.parameter.use [ fhir:value "out" ];
     fhir:OperationDefinition.parameter.min [ fhir:value "1"^^xsd:integer ];
     fhir:OperationDefinition.parameter.max [ fhir:value "1" ];
     fhir:OperationDefinition.parameter.documentation [ fhir:value "The partially (or fully)-populated set of answers for the specified Questionnaire" ];
     fhir:OperationDefinition.parameter.type [ fhir:value "QuestionnaireResponse" ]
  ], [
     fhir:index 7;
     fhir:OperationDefinition.parameter.name [ fhir:value "issues" ];
     fhir:OperationDefinition.parameter.use [ fhir:value "out" ];
     fhir:OperationDefinition.parameter.min [ fhir:value "0"^^xsd:integer ];
     fhir:OperationDefinition.parameter.max [ fhir:value "1" ];
     fhir:OperationDefinition.parameter.documentation [ fhir:value "A list of hints and warnings about problems encountered while populating the questionnaire. These might be show to the user as an advisory note. Note: if the questionnaire cannot be populated at all, then the operation should fail, and an OperationOutcome is returned directly with the failure, rather than using this parameter" ];
     fhir:OperationDefinition.parameter.type [ fhir:value "OperationOutcome" ]
  ].

# - ontology header ------------------------------------------------------------

 a owl:Ontology;
  owl:imports fhir:fhir.ttl.