Exemplo n.º 1
0
        public static List <Encounter> GetEncountersFromComponentSection(this POCD_MT000040Section componentSection, Client client)
        {
            var encounters = new List <Encounter>();

            var encounterEntries = componentSection?.entry?.Where(e => e.Item is POCD_MT000040Encounter);

            if (encounterEntries != null)
            {
                foreach (var encounterEntry in encounterEntries)
                {
                    encounters.Add(GetEncounterFromEncounterEntry(encounterEntry.Item as POCD_MT000040Encounter, client));
                }
            }

            return(encounters);
        }
Exemplo n.º 2
0
        public static List <Medication> GetMedicationsFromComponentSection(this POCD_MT000040Section componentSection, Client client,
                                                                           List <AllergyAdverseEvent> allergyAdverseEvents, CqmSolutionDateRange dischargeDateRange)
        {
            var medications = new List <Medication>();

            var medicationEntries = componentSection?.entry?.Where(e => e.Item is POCD_MT000040SubstanceAdministration);

            if (medicationEntries != null)
            {
                foreach (var medicationEntry in medicationEntries)
                {
                    medications.Add(GetMedicationFromMedicationEntry(
                                        medicationEntry.Item as POCD_MT000040SubstanceAdministration,
                                        client, allergyAdverseEvents, dischargeDateRange));
                }
            }

            return(medications);
        }
Exemplo n.º 3
0
        /// MDHT operation: returns sub-sections
        private List <POCD_MT000040Section> getSections(POCD_MT000040Section section)
        {
            List <POCD_MT000040Section> sections = new List <POCD_MT000040Section>();

            sections.Add(section);

            if (section.component != null)
            {
                foreach (POCD_MT000040Component5 component in section.component)
                { // process successors
                    POCD_MT000040Section child = component.section;
                    if (child != null)
                    {
                        sections.AddRange(getSections(child));
                    }
                }
            }

            return(sections);
        }
Exemplo n.º 4
0
        /// MDHT operation: returns all sections
        public List <POCD_MT000040Section> getAllSections(POCD_MT000040ClinicalDocument clinicalDocument)
        {
            List <POCD_MT000040Section> allSections = new List <POCD_MT000040Section>();
            POCD_MT000040Component2     component2  = clinicalDocument.component;

            if (component2 != null)
            {
                POCD_MT000040StructuredBody structuredBody = component2.structuredBody;
                if (structuredBody != null)
                {
                    foreach (POCD_MT000040Component3 component3 in structuredBody.component)
                    {
                        POCD_MT000040Section section = component3.section;
                        if (section != null)
                        {
                            allSections.AddRange(getSections(section));
                        }
                    }
                }
            }
            return(allSections);
        }
        public static List <DiagnosisProblem> GetDiagnosisProblemsFromComponentSection(this POCD_MT000040Section componentSection, Client client)
        {
            var diagnosisProblems = new List <DiagnosisProblem>();

            var actEntries = componentSection?.entry?.Where(e => e.Item is POCD_MT000040Act);

            if (actEntries != null)
            {
                foreach (var actEntry in actEntries)
                {
                    diagnosisProblems.Add(GetDiagnosisProblemFromDiagnosisProblemAct(actEntry.Item as POCD_MT000040Act, client));
                }
            }

            return(diagnosisProblems);
        }
        public static List <AllergyAdverseEvent> GetAllergyAdverseEventsFromComponentSection(this POCD_MT000040Section componentSection, Client client)
        {
            var allergyAdverseEvents = new List <AllergyAdverseEvent>();

            var actEntries = componentSection?.entry?.Where(e => e.Item is POCD_MT000040Act);

            if (actEntries != null)
            {
                foreach (var actEntry in actEntries)
                {
                    allergyAdverseEvents.Add(GetAllergyAdverseEventFromAct(actEntry.Item as POCD_MT000040Act, client));
                }
            }

            return(allergyAdverseEvents);
        }
Exemplo n.º 7
0
 /// MDHT operation: returns the supplies of the given section
 protected List <POCD_MT000040Supply> getSupplies(POCD_MT000040Section section)
 {
     return(Flatten(Set(section.entry).ConvertAll(i => i.supply)));
 }
Exemplo n.º 8
0
 /// MDHT operation: returns the substance administrations of the given section
 protected List <POCD_MT000040SubstanceAdministration> getSubstanceAdministrations(POCD_MT000040Section section)
 {
     return(Flatten(Set(section.entry).ConvertAll(i => i.substanceAdministration)));
 }