from indivo.models import Procedure from indivo.lib.iso8601 import parse_utc_date as date procedure_fact = Procedure(date_performed=date("2009-05-16T12:00:00"), name="Appendectomy", name_type="http://codes.indivo.org/procedures#", name_value="123", name_abbrev="append", provider_name="Kenneth Mandl", provider_institution="Children's Hospital Boston", location="300 Longwood Ave, Boston MA 02115", comments="Went great!")
from indivo.models import Immunization from indivo.lib.iso8601 import parse_utc_date as date immunization_fact = Immunization( date=date("2009-05-16T12:00:00Z"), administration_status_title="Not Administered", administration_status_system="http://smartplatforms.org/terms/codes/ImmunizationAdministrationStatus#", administration_status_identifier="notAdministered", product_class_title="TYPHOID", product_class_system="http://www2a.cdc.gov/nip/IIS/IISStandards/vaccines.asp?rpt=vg#", product_class_identifier="TYPHOID", product_name_title="typhoid, oral", product_name_system="http://www2a.cdc.gov/nip/IIS/IISStandards/vaccines.asp?rpt=cvx#", product_name_identifier="25", refusal_reason_title="Allergy to vaccine/vaccine components, or allergy to eggs", refusal_reason_system="http://smartplatforms.org/terms/codes/ImmunizationRefusalReason#", refusal_reason_identifier="allergy", )
from indivo.models import Encounter, VitalSigns from indivo.lib.iso8601 import parse_utc_date as date encounter_fact = Encounter( startDate=date("2009-05-16T12:00:00Z"), endDate=date("2009-05-16T16:00:00Z"), facility_name="Wonder Hospital", facility_adr_country="Australia", facility_adr_city="WonderCity", facility_adr_postalcode="5555", facility_adr_street="111 Lake Drive", provider_dea_number="325555555", provider_npi_number="5235235", provider_email="*****@*****.**", provider_name_given="Josuha", provider_name_family="Mandel", provider_tel_1_type="w", provider_tel_1_number="1-235-947-3452", provider_tel_1_preferred_p=True, encounterType_title="Ambulatory encounter", encounterType_system="http://smartplatforms.org/terms/codes/EncounterType#", encounterType_identifier="ambulatory", ) encounter_fact.save() # NOTE: all vitals readings are OPTIONAL. You don't need # to add all 56 fields here to create a VitalSigns object. vitals_fact = VitalSigns( date=date("2009-05-16T12:00:00Z"), encounter=encounter_fact,
from indivo.models import Equipment from indivo.lib.iso8601 import parse_utc_date as date equipment_fact = Equipment(date_started=date("2009-02-05"), date_stopped=date("2009-06-12"), name="Pacemaker", vendor="Acme Medical Devices", description="it works!")
from indivo.models import SimpleClinicalNote from indivo.lib.iso8601 import parse_utc_date as date simple_clinical_note_fact = SimpleClinicalNote( date_of_visit=date("2010-02-02T12:00:00Z"), finalized_at=date("2010-02-03T13:12:00Z"), visit_type="Acute Care", visit_type_type="http://codes.indivo.org/visit-types#", visit_type_value="123", visit_type_abbrev="acute", visit_location="Longfellow Medical", specialty="Hematology/Oncology", specialty_type="http://codes.indivo.org/specialties#", specialty_value="234", specialty_abbrev="hem-onc", signed_at=date("2010-02-03T13:12:00Z"), provider_name="Kenneth Mandl", provider_institution="Children's Hospital Boston", chief_complaint="stomach ache", content="Patient presents with ..." )
notes="Blood sample appears to have hemolyzed", quantitative_result_non_critical_range_max_value="155", quantitative_result_non_critical_range_max_unit="mEq/L", quantitative_result_non_critical_range_min_value="120", quantitative_result_non_critical_range_min_unit="mEq/L", quantitative_result_normal_range_max_value="145", quantitative_result_normal_range_max_unit="mEq/L", quantitative_result_normal_range_min_value="135", quantitative_result_normal_range_min_unit="mEq/L", quantitative_result_value_value="140", quantitative_result_value_unit="mEq/L", collected_at=date("2010-12-27T17:00:00Z"), collected_by_org_name="City Lab", collected_by_org_adr_country="USA", collected_by_org_adr_city="Springfield", collected_by_org_adr_postalcode="11111", collected_by_org_adr_region="MA", collected_by_org_adr_street="20 Elm St", collected_by_name_family="Finnialispi", collected_by_name_given="Tad", collected_by_role="Lab Specialist", )
from indivo.models import Immunization from indivo.lib.iso8601 import parse_utc_date as date immunization_fact = Immunization( date=date("2009-05-16T12:00:00Z"), administration_status_title="Not Administered", administration_status_system= "http://smartplatforms.org/terms/codes/ImmunizationAdministrationStatus#", administration_status_identifier="notAdministered", product_class_title="TYPHOID", product_class_system= "http://www2a.cdc.gov/nip/IIS/IISStandards/vaccines.asp?rpt=vg#", product_class_identifier="TYPHOID", product_name_title="typhoid, oral", product_name_system= "http://www2a.cdc.gov/nip/IIS/IISStandards/vaccines.asp?rpt=cvx#", product_name_identifier="25", refusal_reason_title= "Allergy to vaccine/vaccine components, or allergy to eggs", refusal_reason_system= "http://smartplatforms.org/terms/codes/ImmunizationRefusalReason#", refusal_reason_identifier="allergy", )
from indivo.models import Medication, Fill from indivo.lib.iso8601 import parse_utc_date as date med = Medication( drugName_title="AMITRIPTYLINE HCL 50 MG TAB", drugName_system="http://purl.bioontology.org/ontology/RXNORM/", drugName_identifier="856845", endDate=date("2007-08-14"), frequency_value="2", frequency_unit="/d", instructions="Take two tablets twice daily as needed for pain", provenance_title="Derived by prescription", provenance_system="http://smartplatforms.org/terms/codes/MedicationProvenance#", provenance_identifier="prescription", quantity_value="2", quantity_unit="{tablet}", startDate=date("2007-03-14"), ) fill1 = Fill( date=date("2007-03-14T04:00:00Z"), dispenseDaysSupply=30, pbm="T00000000001011", pharmacy_ncpdpid="5235235", pharmacy_org="CVS #588", pharmacy_adr_country="Australia", pharmacy_adr_city="WonderCity", pharmacy_adr_postalcode="5555", pharmacy_adr_street="111 Lake Drive", provider_dea_number="325555555", provider_npi_number="5235235",
from indivo.models import Equipment from indivo.lib.iso8601 import parse_utc_date as date equipment_fact = Equipment( date_started=date("2009-02-05"), date_stopped=date("2009-06-12"), name="Pacemaker", vendor="Acme Medical Devices", description="it works!" )
from indivo.models import Procedure from indivo.lib.iso8601 import parse_utc_date as date procedure_fact = Procedure( date_performed=date("2009-05-16T12:00:00"), name="Appendectomy", name_type="http://codes.indivo.org/procedures#", name_value="123", name_abbrev="append", provider_name="Kenneth Mandl", provider_institution="Children's Hospital Boston", location="300 Longwood Ave, Boston MA 02115", comments="Went great!" )
from indivo.models import Auditlog from indivo.lib.iso8601 import parse_utc_date as date auditlog_fact = Auditlog( timestamp=date("2016-05-16T12:00:00Z"), app_name=CodedValueField, # "imcportal", app_module="test", event_name="test", patient="161891005", country=CodedValueField, #"italy", event_parameter="test", flag=0, )
from indivo.models import SimpleClinicalNote from indivo.lib.iso8601 import parse_utc_date as date simple_clinical_note_fact = SimpleClinicalNote( date_of_visit=date("2010-02-02T12:00:00Z"), finalized_at=date("2010-02-03T13:12:00Z"), visit_type="Acute Care", visit_type_type="http://codes.indivo.org/visit-types#", visit_type_value="123", visit_type_abbrev="acute", visit_location="Longfellow Medical", specialty="Hematology/Oncology", specialty_type="http://codes.indivo.org/specialties#", specialty_value="234", specialty_abbrev="hem-onc", signed_at=date("2010-02-03T13:12:00Z"), provider_name="Kenneth Mandl", provider_institution="Children's Hospital Boston", chief_complaint="stomach ache", content="Patient presents with ...")