resourceType: StructureDefinition id: cdex-task-data-request url: 'http://hl7.org/fhir/us/davinci-cdex/StructureDefinition/cdex-task-data-request' name: CDexTaskDataRequest title: CDex Task Data Request Profile status: active description: |- This Task profile is used to solicit information from a system. The Data Consumer uses it when direct query transactions are not an option, and the transaction may require human intervention. It represents both the data request and the returned "data request". Data requests are supplied as codes, free-text, or FHIR Restful queries. It can also support requests for more detailed missing data using Questionnaire, CQL, and QuestionnaireResponse as supported by Da Vinci DTR. fhirVersion: 4.0.1 kind: resource abstract: false type: Task baseDefinition: 'http://hl7.org/fhir/StructureDefinition/Task' derivation: constraint differential: element: - id: Task path: Task definition: >- This Task profile is used by the CDex Data Consumer (e.g. Payer or other Provider) to solicit information from a Data Source (e.g., Provider) asynchronously where human involvement to find/aggregate/filter/approve requests may be required. constraint: - key: cdex-7 severity: error human: If code = "data-request-code", must have one "code" input. expression: >- Task.code.coding.code.where($this='data-request-code').exists() implies Task.input.type.coding.code.where($this='data-code').exists() - key: cdex-12 severity: error human: If code = "data-request-query", must have one "query" input. expression: >- Task.code.coding.code.where($this='data-request-query').exists() implies Task.input.type.coding.code.where($this='data-query').exists() - key: cdex-8 severity: error human: If code = "data-request-questionnaire", must have one "questionnaire" input. expression: >- Task.code.coding.code.where($this='data-request-questionnaire').exists() implies Task.input.type.coding.code.where($this='questionnaire').exists() - key: cdex-9 severity: error human: Must have exactly one input that is data-query or data-code or questionnaire #note this conflicts with HREX tdr-1 expression: >- Task.input.type.coding.code.where($this='data-query' or $this='data-code' or $this='questionnaire').count()=1 - key: tdr-2 severity: error human: >- Task statusReason SHALL be populated if status is 'rejected' or 'failed' expression: >- (status = 'rejected' or status = 'failed') implies statusReason.exists() - key: tdr-3 severity: error human: Task output SHALL be populated if status is 'completed' expression: (status = 'completed') implies output.exists() - key: cdex-11 severity: warning human: If code = "data-request-questionnaire" and status = "completed", should have one "questionnaire-response" output referencing the QuestionnaireResponse. expression: >- (Task.code.coding.code.where($this='data-request-questionnaire').exists() and Task.status.where($this='completed').exists()) implies Task.output.type.coding.code.where($this='questionnaire-response').exists() - id: Task.meta path: Task.meta - id: 'Task.meta.tag' path: 'Task.meta.tag' slicing: discriminator: - type: value path: $this rules: open - id: 'Task.meta.tag.system' path: 'Task.meta.tag.system' min: 1 - id: 'Task.meta.tag.code' path: 'Task.meta.tag.code' min: 1 - id: 'Task.meta.tag:work-queue' path: Task.meta.tag sliceName: work-queue short: Work Queue Tag definition: Data Consumer provided work queue tags that providers may use in their workflow to process requests. binding: strength: required valueSet: 'http://hl7.org/fhir/us/davinci-cdex/ValueSet/cdex-work-queue' - id: Task.identifier path: Task.identifier mustSupport: true - id: Task.basedOn path: Task.basedOn short: Authorization for data request requirements: >- Indicates the order (ServiceRequest, CommunicationRequest, etc.) that authorizes the data request mustSupport: true - id: Task.status path: Task.status condition: - 'tdr-2' - 'tdr-3' - 'cdex-11' mustSupport: true binding: strength: required valueSet: 'http://hl7.org/fhir/us/davinci-hrex/ValueSet/hrex-task-status' - id: Task.statusReason path: Task.statusReason requirements: Indicates why task failed or was rejected. condition: - 'tdr-2' mustSupport: true - id: Task.statusReason.text path: Task.statusReason.text min: 1 mustSupport: true - id: Task.businessStatus path: Task.businessStatus short: For example, 'waiting on internal review' comment: >- Conveys the internal business progress of the request and provides more nuance than the overall status. There is no expectation this will be coded, but negotiation of agreed codes can be used between partners requirements: Indicates progress in retrieving the data mustSupport: true - id: Task.businessStatus.text path: Task.businessStatus.text min: 1 mustSupport: true - id: Task.intent path: Task.intent fixedCode: order mustSupport: true - id: Task.code path: Task.code short: data-request-query | data-request-code | data-request-questionnaire definition: >- The code element is used to indicate that Task is a request for data and whether the data request is FHIR query syntax, a code, or a questionnaire. The code element is a required element and must be populated with one of the following values: "data-request-query", data-request-code", or "data-request-questionnaire". min: 1 condition: - cdex-7 - cdex-8 - cdex-11 - cdex-12 mustSupport: true binding: strength: required valueSet: 'http://hl7.org/fhir/us/davinci-cdex/ValueSet/cdex-data-request-task-code' - id: Task.code.coding path: Task.code.coding min: 1 mustSupport: true - id: Task.code.coding.system path: Task.code.coding.system fixedUri: 'http://hl7.org/fhir/us/davinci-cdex/CodeSystem/cdex-temp' mustSupport: true - id: Task.code.coding.code path: Task.code.coding.code min: 1 mustSupport: true - id: Task.focus path: Task.focus short: What task is acting on min: 0 max: '0' - id: Task.for path: Task.for short: Member (i.e., patient) being queried comment: Queries must always be in the scope of a single member min: 1 type: - code: Reference targetProfile: - 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient|3.1.1' - 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient|6.1.0' - 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient|7.0.0' mustSupport: true - id: Task.for.identifier path: Task.for.identifier short: Patient Member ID definition: business identifier representing the Patient # min: 0 mustSupport: true - id: Task.authoredOn path: Task.authoredOn min: 1 mustSupport: true - id: Task.requester path: Task.requester short: Who is asking for data min: 1 type: - code: Reference targetProfile: - 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner|3.1.1' - 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner|6.1.0' - 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner|7.0.0' - 'http://hl7.org/fhir/us/davinci-hrex/StructureDefinition/hrex-organization' mustSupport: true - id: Task.requester.identifier path: Task.requester.identifier short: Data Consumer ID definition: business identifier representing the Data Consumer # min: 0 mustSupport: true - id: Task.owner path: Task.owner short: Who is being asked for data min: 1 type: - code: Reference targetProfile: - 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner|3.1.1' - 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner|6.1.0' - 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner|7.0.0' - 'http://hl7.org/fhir/us/davinci-hrex/StructureDefinition/hrex-organization' mustSupport: true - id: Task.owner.identifier path: Task.owner.identifier short: Provider ID definition: business identifier representing the Provider # min: mustSupport: true - id: Task.reasonCode path: Task.reasonCode comment: >- Only text is expected, though codes can be used for partners with agreed value sets requirements: Indicates why the information request is occurring mustSupport: true - id: Task.reasonCode.text path: Task.reasonCode.text min: 1 mustSupport: true - id: Task.reasonReference path: Task.reasonReference comment: >- Example targets would be HRex Coverage, PCDE Claim (for prior authorization) or a bare Claim resource for referencing an actual Claim. requirements: Indicates why the information request is occurring type: - code: Reference targetProfile: - 'http://hl7.org/fhir/StructureDefinition/Claim' - 'http://hl7.org/fhir/StructureDefinition/Coverage' - http://hl7.org/fhir/us/core/StructureDefinition/us-core-coverage|6.1.0 - http://hl7.org/fhir/us/core/StructureDefinition/us-core-coverage|7.0.0 mustSupport: true - id: Task.reasonReference.identifier path: Task.reasonReference.identifier short: Coverage or Claim ID definition: business identifier representing the coverage, claim, or prior-authorization ID comment: Most payer systems will not expose their claim and prior authorization records as a FHIR resource. They will provide a unique business identifier for the claim or prior authorization using `Task.reasonReference.identifier`. This could be a payer-assigned or provider-assigned identifier which **SHOULD** be communicated in `Task.reasonReference.identifier.type` using the "FILL" for the payer and "PLAC" for the provider. # min: 1 mustSupport: true - id: Task.input path: Task.input slicing: discriminator: - type: value path: type rules: open min: 1 mustSupport: true - id: 'Task.input:query' path: Task.input sliceName: query short: Requested query definition: Indicates the specific FHIR RESTful query to be executed comment: >- This will contain the text that should go after the '?' when executing the query. max: '1' condition: - cdex-9 - cdex-12 mustSupport: true - id: 'Task.input:query.type' path: Task.input.type patternCodeableConcept: coding: - system: 'http://hl7.org/fhir/us/davinci-hrex/CodeSystem/hrex-temp' code: data-query mustSupport: true - id: 'Task.input:query.value[x]' path: 'Task.input.value[x]' short: query value type: - code: string mustSupport: true - id: 'Task.input:code' path: Task.input sliceName: code short: Requested data code definition: A code indicating the type of data/document to be returned comment: >- This might be a document code or other code describing the requested information. If no appropriate standard code exists, local codes may be used between partners, or a human-readable textual description of the desired data can be provided. Downstream profiles may tighten expectations for this element. max: '1' condition: - cdex-7 - cdex-9 mustSupport: true - id: 'Task.input:code.type' path: Task.input.type patternCodeableConcept: coding: - system: 'http://hl7.org/fhir/us/davinci-hrex/CodeSystem/hrex-temp' code: data-code mustSupport: true - id: 'Task.input:code.value[x]' path: 'Task.input.value[x]' short: query value type: - code: CodeableConcept min: 1 max: '1' mustSupport: true binding: strength: extensible valueSet: 'http://hl7.org/fhir/us/core/ValueSet/us-core-documentreference-type' - id: 'Task.input:questionnaire' # struct copied from SDC path: Task.input sliceName: questionnaire short: Data Request questionnaire definition: Indicates the questionnaire to be completed. max: '1' condition: - cdex-8 - cdex-9 # mustSupport: true - id: 'Task.input:questionnaire.type' path: Task.input.type min: 1 max: '1' type: - code: CodeableConcept patternCodeableConcept: coding: - system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/temp' code: questionnaire # mustSupport: true - id: 'Task.input:questionnaire.value[x]' path: 'Task.input.value[x]' short: URL min: 1 max: '1' type: - code: canonical targetProfile: - 'http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-std-questionnaire' - 'http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-adapt' # mustSupport: true - id: 'Task.input:questionnaire.value[x].extension:questionnaireDisplay' path: Task.input.value[x].extension sliceName: questionnaireDisplay comment: >- This can be handy for commonly used questionnaires with a recognizable name. min: 0 max: '1' type: - code: Extension profile: - 'http://hl7.org/fhir/StructureDefinition/display' # mustSupport: true - id: 'Task.input:signature' path: Task.input sliceName: signature short: Signature flag definition: Flag to indicate whether the requested data requires a signature. max: '1' mustSupport: true - id: 'Task.input:signature.type' path: Task.input.type patternCodeableConcept: coding: - system: 'http://hl7.org/fhir/us/davinci-cdex/CodeSystem/cdex-temp' code: signature-flag mustSupport: true - id: 'Task.input:signature.value[x]' path: 'Task.input.value[x]' short: Signature flag value type: - code: boolean mustSupport: true - id: 'Task.input:POU' path: Task.input sliceName: POU short: Purpose of use code definition: Represent the purpose of use for the requested data. max: '1' # mustSupport: true - id: 'Task.input:POU.type' path: Task.input.type patternCodeableConcept: coding: - system: 'http://hl7.org/fhir/us/davinci-cdex/CodeSystem/cdex-temp' code: purpose-of-use # mustSupport: true - id: 'Task.input:POU.value[x]' path: 'Task.input.value[x]' short: Purpose of use value type: - code: CodeableConcept binding: strength: extensible valueSet: 'http://hl7.org/fhir/us/davinci-cdex/ValueSet/cdex-POU' # mustSupport: true - id: Task.output path: Task.output slicing: discriminator: - type: value path: type rules: open condition: - tdr-3 mustSupport: true - id: 'Task.output:data' path: Task.output sliceName: data short: Requested data definition: >- The data content requested. Multiple repetitions are permitted in the event that a single request returns multiple instances and packaging in a Bundle is not necessary/appropriate. Also, in most cases Provenance instances should accompany returned data so that the requester can best integrate and allocate trust/confidence to the provided data. mustSupport: true - id: 'Task.output:data.type' path: Task.output.type patternCodeableConcept: coding: - system: 'http://hl7.org/fhir/us/davinci-hrex/CodeSystem/hrex-temp' code: data-value mustSupport: true - id: 'Task.output:data.value[x]' path: 'Task.output.value[x]' short: data reference comment: >- The referenced data might be contained within the Task (if it doesn't have/shouldn't have independent persistence), but can also refer to data stored elsewhere - either on the owner's system or some other system. Note that all returned data SHOULD comply with appropriate US-Core and/or Da Vinci profiles. The "questionnaire-response" output type is for a QuestionnaireResponse resulting from the request. type: - code: Reference mustSupport: true - id: 'Task.output:response' path: Task.output sliceName: response definition: Indicates the questionnaire response resulting from the request. max: '1' condition: - cdex-11 # mustSupport: true - id: 'Task.output:response.type' path: Task.output.type type: - code: CodeableConcept patternCodeableConcept: coding: - system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/temp' code: questionnaire-response # mustSupport: true - id: 'Task.output:response.value[x]' path: 'Task.output.value[x]' short: Reference to the QuestionnaireResponse min: 1 max: '1' type: - code: Reference targetProfile: - 'http://hl7.org/fhir/us/davinci-cdex/StructureDefinition/cdex-sdc-questionnaireresponse' - 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse-adapt' # mustSupport: true