HL7 / davinci-pdex-formulary

Da Vinci Provider Data Exchange - Drug Formulary
4 stars 4 forks source link

FormularyDrug Resource Explosion #44

Open jeffeastman opened 4 years ago

jeffeastman commented 4 years ago

I'm working with Blue Cross Blue Shield of Michigan's actual formulary QHP files and the current definition of FormularyDrug as an extension to MedicationKnowledge is causing a FHIR resource explosion which appears to be unnecessary. The BCBSM drugs.json file contains 4464 drug entries and their plans.json file contains 15 plans resulting in an explosion of 40320 FHIR MedicationKnowledge resources when converted. The explosion happens because each QhpPlan reference in the QhpDrug must create a separate MedicationKnowledge resource.

Seems to me creating a BackboneElement structured like QhpPlan called FormularyDrug.plan with a 1..* cardinality would avoid this explosion.

Something like this:

    String plan_id_type;
    String plan_id;
    String drug_tier;
    Boolean prior_authorization;
    Boolean step_therapy;
    Boolean quantity_limit;
jeffeastman commented 4 years ago

With this change

{
  "rxnorm_id": "1000093",
  "drug_name": "PRUDOXIN CREAM (GRAM)",
  "plans": [
    {
      "plan_id_type": "HIOS-PLAN-ID",
      "plan_id": "15560MI0350001",
      "drug_tier": "GENERIC"
    },
    {
      "plan_id_type": "HIOS-PLAN-ID",
      "plan_id": "15560MI0350002",
      "drug_tier": "GENERIC"
    },
    {
      "plan_id_type": "HIOS-PLAN-ID",
      "plan_id": "15560MI0350003",
      "drug_tier": "GENERIC"
    },
    {
      "plan_id_type": "HIOS-PLAN-ID",
      "plan_id": "15560MI0350004",
      "drug_tier": "GENERIC"
    },
    {
      "plan_id_type": "HIOS-PLAN-ID",
      "plan_id": "15560MI0350005",
      "drug_tier": "GENERIC"
    },
    {
      "plan_id_type": "HIOS-PLAN-ID",
      "plan_id": "15560MI0350006",
      "drug_tier": "GENERIC"
    },
    {
      "plan_id_type": "HIOS-PLAN-ID",
      "plan_id": "15560MI0350008",
      "drug_tier": "GENERIC"
    },
    {
      "plan_id_type": "HIOS-PLAN-ID",
      "plan_id": "15560MI1120001",
      "drug_tier": "GENERIC"
    },
    {
      "plan_id_type": "HIOS-PLAN-ID",
      "plan_id": "15560MI1130001",
      "drug_tier": "GENERIC"
    }
  ]
}

Becomes 1 FormularyDrug from 1 QhpDrug

{
  "resourceType": "MedicationKnowledge",
  "id": "MedicationKnowledge-1",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">This is a simple narrative with only plain text</div>"
  },
  "extension": [
    {
      "url": "http://mihin.org/extension/copyright",
      "valueString": "Copyright 2014-2020 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0.  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugPlan-extension",
      "extension": [
        {
          "url": "drugTier",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
                "code": "GENERIC",
                "display": "plan.drug_tier"
              }
            ]
          }
        },
        {
          "url": "planId",
          "valueString": "15560MI0350001"
        }
      ]
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugPlan-extension",
      "extension": [
        {
          "url": "drugTier",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
                "code": "GENERIC",
                "display": "plan.drug_tier"
              }
            ]
          }
        },
        {
          "url": "planId",
          "valueString": "15560MI0350002"
        }
      ]
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugPlan-extension",
      "extension": [
        {
          "url": "drugTier",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
                "code": "GENERIC",
                "display": "plan.drug_tier"
              }
            ]
          }
        },
        {
          "url": "planId",
          "valueString": "15560MI0350003"
        }
      ]
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugPlan-extension",
      "extension": [
        {
          "url": "drugTier",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
                "code": "GENERIC",
                "display": "plan.drug_tier"
              }
            ]
          }
        },
        {
          "url": "planId",
          "valueString": "15560MI0350004"
        }
      ]
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugPlan-extension",
      "extension": [
        {
          "url": "drugTier",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
                "code": "GENERIC",
                "display": "plan.drug_tier"
              }
            ]
          }
        },
        {
          "url": "planId",
          "valueString": "15560MI0350005"
        }
      ]
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugPlan-extension",
      "extension": [
        {
          "url": "drugTier",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
                "code": "GENERIC",
                "display": "plan.drug_tier"
              }
            ]
          }
        },
        {
          "url": "planId",
          "valueString": "15560MI0350006"
        }
      ]
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugPlan-extension",
      "extension": [
        {
          "url": "drugTier",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
                "code": "GENERIC",
                "display": "plan.drug_tier"
              }
            ]
          }
        },
        {
          "url": "planId",
          "valueString": "15560MI0350008"
        }
      ]
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugPlan-extension",
      "extension": [
        {
          "url": "drugTier",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
                "code": "GENERIC",
                "display": "plan.drug_tier"
              }
            ]
          }
        },
        {
          "url": "planId",
          "valueString": "15560MI1120001"
        }
      ]
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugPlan-extension",
      "extension": [
        {
          "url": "drugTier",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
                "code": "GENERIC",
                "display": "plan.drug_tier"
              }
            ]
          }
        },
        {
          "url": "planId",
          "valueString": "15560MI1130001"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "1000093",
        "display": "PRUDOXIN CREAM (GRAM)"
      }
    ]
  }
}

Instead of 9 FormularyDrugs from 1 QhpDrug

{
  "resourceType": "MedicationKnowledge",
  "id": "MedicationKnowledge-1",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">This is a simple narrative with only plain text</div>"
  },
  "extension": [
    {
      "url": "http://mihin.org/extension/copyright",
      "valueString": "Copyright 2014-2020 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0.  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugTierDefinition-extension",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
            "code": "GENERIC",
            "display": "plan.drug_tier"
          }
        ]
      }
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-PlanID-extension",
      "valueString": "15560MI0350001"
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "1000093",
        "display": "PRUDOXIN CREAM (GRAM)"
      }
    ]
  }
}
{
  "resourceType": "MedicationKnowledge",
  "id": "MedicationKnowledge-2",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">This is a simple narrative with only plain text</div>"
  },
  "extension": [
    {
      "url": "http://mihin.org/extension/copyright",
      "valueString": "Copyright 2014-2020 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0.  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugTierDefinition-extension",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
            "code": "GENERIC",
            "display": "plan.drug_tier"
          }
        ]
      }
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-PlanID-extension",
      "valueString": "15560MI0350002"
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "1000093",
        "display": "PRUDOXIN CREAM (GRAM)"
      }
    ]
  }
}
{
  "resourceType": "MedicationKnowledge",
  "id": "MedicationKnowledge-3",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">This is a simple narrative with only plain text</div>"
  },
  "extension": [
    {
      "url": "http://mihin.org/extension/copyright",
      "valueString": "Copyright 2014-2020 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0.  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugTierDefinition-extension",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
            "code": "GENERIC",
            "display": "plan.drug_tier"
          }
        ]
      }
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-PlanID-extension",
      "valueString": "15560MI0350003"
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "1000093",
        "display": "PRUDOXIN CREAM (GRAM)"
      }
    ]
  }
}
{
  "resourceType": "MedicationKnowledge",
  "id": "MedicationKnowledge-4",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">This is a simple narrative with only plain text</div>"
  },
  "extension": [
    {
      "url": "http://mihin.org/extension/copyright",
      "valueString": "Copyright 2014-2020 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0.  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugTierDefinition-extension",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
            "code": "GENERIC",
            "display": "plan.drug_tier"
          }
        ]
      }
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-PlanID-extension",
      "valueString": "15560MI0350004"
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "1000093",
        "display": "PRUDOXIN CREAM (GRAM)"
      }
    ]
  }
}
{
  "resourceType": "MedicationKnowledge",
  "id": "MedicationKnowledge-5",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">This is a simple narrative with only plain text</div>"
  },
  "extension": [
    {
      "url": "http://mihin.org/extension/copyright",
      "valueString": "Copyright 2014-2020 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0.  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugTierDefinition-extension",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
            "code": "GENERIC",
            "display": "plan.drug_tier"
          }
        ]
      }
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-PlanID-extension",
      "valueString": "15560MI0350005"
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "1000093",
        "display": "PRUDOXIN CREAM (GRAM)"
      }
    ]
  }
}
{
  "resourceType": "MedicationKnowledge",
  "id": "MedicationKnowledge-6",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">This is a simple narrative with only plain text</div>"
  },
  "extension": [
    {
      "url": "http://mihin.org/extension/copyright",
      "valueString": "Copyright 2014-2020 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0.  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugTierDefinition-extension",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
            "code": "GENERIC",
            "display": "plan.drug_tier"
          }
        ]
      }
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-PlanID-extension",
      "valueString": "15560MI0350006"
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "1000093",
        "display": "PRUDOXIN CREAM (GRAM)"
      }
    ]
  }
}
{
  "resourceType": "MedicationKnowledge",
  "id": "MedicationKnowledge-7",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">This is a simple narrative with only plain text</div>"
  },
  "extension": [
    {
      "url": "http://mihin.org/extension/copyright",
      "valueString": "Copyright 2014-2020 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0.  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugTierDefinition-extension",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
            "code": "GENERIC",
            "display": "plan.drug_tier"
          }
        ]
      }
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-PlanID-extension",
      "valueString": "15560MI0350008"
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "1000093",
        "display": "PRUDOXIN CREAM (GRAM)"
      }
    ]
  }
}
{
  "resourceType": "MedicationKnowledge",
  "id": "MedicationKnowledge-8",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">This is a simple narrative with only plain text</div>"
  },
  "extension": [
    {
      "url": "http://mihin.org/extension/copyright",
      "valueString": "Copyright 2014-2020 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0.  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugTierDefinition-extension",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
            "code": "GENERIC",
            "display": "plan.drug_tier"
          }
        ]
      }
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-PlanID-extension",
      "valueString": "15560MI1120001"
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "1000093",
        "display": "PRUDOXIN CREAM (GRAM)"
      }
    ]
  }
}
{
  "resourceType": "MedicationKnowledge",
  "id": "MedicationKnowledge-9",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">This is a simple narrative with only plain text</div>"
  },
  "extension": [
    {
      "url": "http://mihin.org/extension/copyright",
      "valueString": "Copyright 2014-2020 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0.  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-DrugTierDefinition-extension",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/us/Davinci-drug-formulary/CodeSystem/usdf-DrugTierCS",
            "code": "GENERIC",
            "display": "plan.drug_tier"
          }
        ]
      }
    },
    {
      "url": "http://hl7.org/fhir/us/Davinci-drug-formulary/StructureDefinition/usdf-PlanID-extension",
      "valueString": "15560MI1130001"
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "1000093",
        "display": "PRUDOXIN CREAM (GRAM)"
      }
    ]
  }
}