Skip to content

Pathways on FHIR Mapping

blangley28 edited this page Sep 8, 2020 · 13 revisions

Pathways to CPG Mapping

This is an evolving wiki page for mapping the internal data model for pathways into CPG. This page builds off Pathways on FHIR and Pathways on FHIR Resources.

Powerpoint deck of mapping is available for download here.

Overview

Each pathway in the builder will map to a Recommendation Definition. Although the builder supports joining branches again, the CPG exporter will not. Anywhere two branches of the pathway rejoin the CPG representation will have the entire sub-tree copied. Each Action Node will map to only one Activity Definition but the RecommendationDefinition.action may have duplicate entries for the same Action Node. In general the RecommendationDefinition.actions will be all of the Action Nodes as well as any Branch Nodes whose parent is also a Branch Node.

Mapping

Pathway to Recommendation Definition

Mapping the pathway metadata to a Recommendation is very straight forward. Screen Shot 2020-08-06 at 2 45 22 PM

Nodes to RecommendationDefinition.action

Unlike the pathway data model which has a discrete node for both action and branch, the Recommendation Definition only defines a list of actions. Each Action Node will map to its own RecommendationDefinition.action. The Branch Nodes do not become their own action unless their parent is also a branch (nested branch node). Branch Nodes are represented in the Recommendation Definition as the action.condition property of the child transition.

The general mapping of RecommendationDefinition.action is:

{
  id: string, // automatically assigned
  title: node.label,
  description: ("Action for " | "Branch based on ") + node.label,
  definitionCanonical?: canonical(ActivityDefinition),
  condition?: [{
    kind: "applicability",
    expression: {
      language: "text/cql",
      expression: parent.transition.condition
    }
  }],
  relatedAction?: [
    {
      actionId: string // parent action id,
      relationship: "after-end"
    },
    {
      actionId: string // child action id,
      relationship: "before-start"
    }
  ],
  action?: [ {Action} ] // child actions
}

where:

  • definitionCanonical is defined for action nodes, otherwise undefined
  • condition is defined when the parent node is a branch, otherwise undefined
  • action is defined for nested branch nodes, otherwise undefined
  • relatedAction defines all of the parent and child transitions for Action Nodes only

Action Nodes

Screen Shot 2020-09-08 at 2 01 19 PM

Nested Branch Nodes

Screen Shot 2020-09-08 at 2 01 57 PM

ActionNode.action to Activity Definition

Even if a single Action Node has multiple RecommendationDefinition.actions they will have the same definitionCanonical to a single ActivityDefinition. The mapping is trivial: Screen Shot 2020-09-08 at 2 45 41 PM

Notes