Indivo Data Model: Allergy

Model Definition

As SDML:

[{
    "__modelname__": "Allergy",    
    "allergic_reaction": "CodedValue",
    "category": "CodedValue",
    "drug_allergen": "CodedValue",
    "drug_class_allergen": "CodedValue",
    "food_allergen": "CodedValue",
    "severity": "CodedValue"
},
{
    "__modelname__": "AllergyExclusion",
    "name": "CodedValue"
}]

As a Django Model Class:

from indivo.models import Fact
from indivo.fields import CodedValueField

class Allergy(Fact):
    allergic_reaction = CodedValueField()
    category = CodedValueField()
    drug_allergen = CodedValueField()
    drug_class_allergen = CodedValueField()
    food_allergen = CodedValueField()
    severity = CodedValueField()

class AllergyExclusion(Fact):
    name = CodedValueField()

Examples

As SDMJ:

[{
    "__modelname__": "Allergy",
    "allergic_reaction_title": "Anaphylaxis",
    "allergic_reaction_system": "http://purl.bioontology.org/ontology/SNOMEDCT/",
    "allergic_reaction_identifier": "39579001",
    "category_title": "Drug allergy",
    "category_system": "http://purl.bioontology.org/ontology/SNOMEDCT/",
    "category_identifier": "416098002",
    "drug_class_allergen_title": "Sulfonamide Antibacterial",
    "drug_class_allergen_system": "http://purl.bioontology.org/ontology/NDFRT/",
    "drug_class_allergen_identifier": "N0000175503",
    "severity_title": "Severe",
    "severity_system": "http://purl.bioontology.org/ontology/SNOMEDCT/",
    "severity_identifier": "24484000"
},
{
    "__modelname__": "AllergyExclusion",
    "name_title": "No known allergies",
    "name_identifier":"160244002",
    "name_system": "http://purl.bioontology.org/ontology/SNOMEDCT"
}]

As SDMX:

<Models>
  <Model name="Allergy">
    <Field name="allergic_reaction_title">Anaphylaxis</Field>
    <Field name="allergic_reaction_system">http://purl.bioontology.org/ontology/SNOMEDCT/</Field>
    <Field name="allergic_reaction_identifier">39579001</Field>
    <Field name="category_title">Drug allergy</Field>
    <Field name="category_system">http://purl.bioontology.org/ontology/SNOMEDCT/</Field>
    <Field name="category_identifier">416098002</Field>
    <Field name="drug_class_allergen_title">Sulfonamide Antibacterial</Field>
    <Field name="drug_class_allergen_system">http://purl.bioontology.org/ontology/NDFRT/</Field>
    <Field name="drug_class_allergen_identifier">N0000175503</Field>
    <Field name="severity_title">Severe</Field>
    <Field name="severity_system">http://purl.bioontology.org/ontology/SNOMEDCT/</Field>
    <Field name="severity_identifier">24484000</Field>
  </Model>
  <Model name="AllergyExclusion">
    <Field name="name_title">No known allergies</Field>
    <Field name="name_identifier">160244002</Field>
    <Field name = "name_system">http://purl.bioontology.org/ontology/SNOMEDCT/</Field>
  </Model>
</Models>

As a Fact object:

from indivo.models import Allergy

allergy_fact = Allergy(
    allergic_reaction_title="Anaphylaxis",
    allergic_reaction_system="http://purl.bioontology.org/ontology/SNOMEDCT/",
    allergic_reaction_identifier="39579001",
    category_title="Drug allergy",
    category_system="http://purl.bioontology.org/ontology/SNOMEDCT/",
    category_identifier="416098002",
    drug_class_allergen_title="Sulfonamide Antibacterial",
    drug_class_allergen_system="http://purl.bioontology.org/ontology/NDFRT/",
    drug_class_allergen_identifier="N0000175503",
    severity_title="Severe",
    severity_system="http://purl.bioontology.org/ontology/SNOMEDCT/",
    severity_identifier="24484000",
    )

allergy_exclusion = AllergyExclusion(
    name_title="No known allergies",
    name_identifier="160244002",
    name_system="http://purl.bioontology.org/ontology/SNOMEDCT/",
)

Project Versions

Table Of Contents

Previous topic

Indivo Data Models

Next topic

Indivo Data Model: Equipment

This Page