示例#1
0
        /// <summary>
        /// Reads an XML Object From An Existing DOM
        /// </summary>
        /// <param name="rootnode">Node Containing the root Object element</param>
        public void ReadXML(XmlNode rootnode)
        {
            foreach (XmlNode childnode in rootnode.ChildNodes)
            {
                if (string.IsNullOrEmpty(childnode.InnerText))
                {
                    continue;
                }

                switch (childnode.LocalName)
                {
                case "OrganizationInformation":
                    this.organizationInformation = new OrganizationInformation();
                    this.organizationInformation.ReadXML(childnode);
                    break;

                case "OrganizationGeoLocation":
                    this.organizationGeoLocation = new GeoOASISWhere();
                    this.organizationGeoLocation.ReadXML(childnode.ChildNodes[0]);
                    break;

                case "#comment":
                    break;

                default:
                    throw new ArgumentException("Unexpected Child Node Name: " + childnode.Name + " in OrganizationType");
                }
            }
        }
示例#2
0
        /// <summary>
        /// Reads an XML From An Existing DOM
        /// </summary>
        /// <param name="rootnode">Node Containing the root Object</param>
        internal void ReadXML(XmlNode rootnode)
        {
            foreach (XmlNode node in rootnode.ChildNodes)
            {
                if (string.IsNullOrEmpty(node.InnerText))
                {
                    continue;
                }

                switch (node.LocalName)
                {
                case "LocationDescription":
                    this.locationDescription = node.InnerText;
                    break;

                case "Address":
                    this.address = new AddressType();
                    this.address.ReadXML(node);
                    break;

                case "TargetArea":
                    this.targetArea = new GeoOASISWhere();
                    this.targetArea.ReadXML(node.FirstChild);
                    break;
                }
            }
        }
示例#3
0
        /// <summary>
        /// Reads this Object's values from an XML node list
        /// </summary>
        /// <param name="rootnode">root XML Node of the Object element</param>
        internal override void ReadXML(XmlNode rootnode)
        {
            foreach (XmlNode childnode in rootnode.ChildNodes)
            {
                if (string.IsNullOrEmpty(childnode.InnerText))
                {
                    continue;
                }

                switch (childnode.LocalName)
                {
                case "DisasterDeclarationDateTime":
                    this.disasterDeclarationDateTime = Convert.ToDateTime(childnode.InnerText);
                    break;

                case "Jurisdiction":
                    this.jurisdicition = new GeoOASISWhere();
                    this.jurisdicition.ReadXML(childnode.FirstChild);
                    break;

                case "Remarks":
                    this.remarks = childnode.InnerText;
                    break;

                case "IncidentDecisionSupportInformation":
                    this.supportInformation = new IncidentDecisionSupportInformation();
                    this.supportInformation.ReadXML(childnode);
                    break;

                case "SituationSummary":
                    this.sitSummary = new SituationSummary();
                    this.sitSummary.ReadXML(childnode);
                    break;

                case "#comment":
                    break;

                default:
                    throw new ArgumentException("Unexpected Child Node Name: " + childnode.Name + " in ManagementReportingSummary");
                }
            }
        }
示例#4
0
        /// <summary>
        /// Reads this Object's values from an XML node list
        /// </summary>
        /// <param name="rootnode">root XML Node of the Object element</param>
        internal override void ReadXML(XmlNode rootnode)
        {
            foreach (XmlNode childnode in rootnode.ChildNodes)
            {
                if (string.IsNullOrEmpty(childnode.InnerText))
                {
                    continue;
                }

                switch (childnode.LocalName)
                {
                case "ObservationID":
                    this.observationID = childnode.InnerText;
                    break;

                case "ObservationType":
                    this.observationType = (SitRepObservationType)Enum.Parse(typeof(SitRepObservationType), childnode.InnerText);
                    break;

                case "ObservationText":
                    this.observationText = childnode.InnerText;
                    break;

                case "ImmediateNeeds":
                    this.immediateNeeds = childnode.InnerText;
                    break;

                case "ReportLocation":
                    this.reportLocation = new GeoOASISWhere();
                    this.reportLocation.ReadXML(childnode.FirstChild);
                    break;

                case "#comment":
                    break;

                default:
                    throw new ArgumentException("Unexpected Child Node Name: " + childnode.Name + " in SituationObservation");
                }
            }
        }
示例#5
0
        /// <summary>
        /// Reads an XML From An Existing DOM
        /// </summary>
        /// <param name="rootnode">Node Containing the root Object</param>
        public void ReadXML(XmlNode rootnode)
        {
            if (rootnode.LocalName == "SitRep")
            {
                foreach (XmlNode childnode in rootnode.ChildNodes)
                {
                    if (string.IsNullOrEmpty(childnode.InnerText))
                    {
                        continue;
                    }

                    switch (childnode.LocalName)
                    {
                    case "ObservationLocation":
                        if (childnode.ChildNodes.Count != 1)
                        {
                            throw new ArgumentException("Unexpected Number of Location Children in SitRep");
                        }

                        this.reportLocation = new GeoOASISWhere();
                        this.reportLocation.ReadXML(childnode.ChildNodes[0]);
                        break;

                    case "MessageID":
                        this.messageID = childnode.InnerText;
                        break;

                    case "IncidentID":
                        this.incidentID = childnode.InnerText;
                        break;

                    case "FromDateTime":
                        this.fromDateTime = DateTime.Parse(childnode.InnerText);
                        if (this.fromDateTime.Kind == DateTimeKind.Unspecified)
                        {
                            this.fromDateTime = DateTime.MinValue;
                            throw new ArgumentException("TimeZone Information Must Be Specified");
                        }

                        this.fromDateTime = this.fromDateTime.ToUniversalTime();
                        break;

                    case "ToDateTime":
                        this.todateTime = DateTime.Parse(childnode.InnerText);
                        if (this.todateTime.Kind == DateTimeKind.Unspecified)
                        {
                            this.todateTime = DateTime.MinValue;
                            throw new ArgumentException("TimeZone Information Must Be Specified");
                        }

                        this.todateTime = this.todateTime.ToUniversalTime();
                        break;

                    case "PreparedDateTime":
                        this.preparedDateTime = DateTime.Parse(childnode.InnerText);
                        if (this.preparedDateTime.Kind == DateTimeKind.Unspecified)
                        {
                            this.preparedDateTime = DateTime.MinValue;
                            throw new ArgumentException("TimeZone Information Must Be Specified");
                        }

                        this.preparedDateTime = this.preparedDateTime.ToUniversalTime();
                        break;

                    case "NextContact":
                        this.nextContact = DateTime.Parse(childnode.InnerText);
                        if (this.nextContact.Kind == DateTimeKind.Unspecified)
                        {
                            this.nextContact = DateTime.MinValue;
                            throw new ArgumentException("TimeZone Information Must Be Specified");
                        }

                        this.nextContact = this.nextContact.ToUniversalTime();
                        break;

                    case "Certainty":
                        this.certainty = (CertaintyType)Enum.Parse(typeof(CertaintyType), childnode.InnerText);
                        break;

                    case "OrginatingMessageID":
                        this.originatingMessageID = childnode.InnerText;
                        break;

                    case "PrecedingMessageID":
                        this.precedingMessageID = childnode.InnerText;
                        break;

                    case "PreparedBy":
                        this.preparedBy = new PersonDetails();
                        this.preparedBy.ReadXML(childnode);
                        break;

                    case "AuthorizedBy":
                        this.authorizedBy = new PersonDetails();
                        this.authorizedBy.ReadXML(childnode);
                        break;

                    case "ReportTitle":
                        this.reportTitle = childnode.InnerText;
                        break;

                    case "ReportPurpose":
                        this.reportPurpose = childnode.InnerText;
                        break;

                    case "ReportNumber":
                        this.reportNumber = childnode.InnerText;
                        break;

                    case "ReportVersion":
                        this.reportVersion = childnode.InnerText;
                        break;

                    case "MessageReportType":
                        this.messageReportType = (SitRepReportType)Enum.Parse(typeof(SitRepReportType), childnode.InnerText);
                        break;

                    case "Urgency":
                        this.urgency = (UrgencyType)Enum.Parse(typeof(UrgencyType), childnode.InnerText);
                        break;

                    case "ActionPlan":
                        this.actionPlan = childnode.InnerText;
                        break;

                    case "CasualtyandIllnessSummaryByPeriod":
                        this.report = new CasualtyandIllnessSummaryByPeriod();
                        this.report.ReadXML(childnode);
                        break;

                    case "ResponseResourcesTotals":
                        this.report = new ResponseResourcesTotals();
                        this.report.ReadXML(childnode);
                        break;

                    case "SituationInformation":
                        this.report = new SituationInformation();
                        this.report.ReadXML(childnode);
                        break;

                    case "ManagementReportingSummary":
                        this.report = new ManagementReportingSummary();
                        this.report.ReadXML(childnode);
                        break;

                    case "SituationObservation":
                        this.report = new SituationObservation();
                        this.report.ReadXML(childnode);
                        break;

                    case "#comment":
                        break;

                    default:
                        throw new ArgumentException("Unexpected Child Node Name: " + childnode.Name + " in SitRep");
                    }
                }
            }
            else
            {
                throw new ArgumentException("Unexpected Root Node Name: " + rootnode.Name + " in SitRep");
            }
        }
示例#6
0
        /// <summary>
        /// Reads this Object's values from an XML node list
        /// </summary>
        /// <param name="rootnode">root XML Node of the Object element</param>
        internal void ReadXML(XmlNode rootnode)
        {
            foreach (XmlNode childnode in rootnode.ChildNodes)
            {
                if (string.IsNullOrEmpty(childnode.InnerText))
                {
                    continue;
                }

                switch (childnode.LocalName)
                {
                case "AgencyOrganization":
                    this.agencyOrganization = new OrganizationInformation();
                    this.agencyOrganization.ReadXML(childnode.FirstChild);
                    break;

                case "BranchDivisionGroupLocation":
                    this.branchDivisionGroupLocation = childnode.InnerText;
                    break;

                case "TypeCategoryKind":
                    this.typeCategoryKind = childnode.InnerText;
                    break;

                case "OverheadPosition":
                    this.overheadPosition = childnode.InnerText;
                    break;

                case "SpecialEquipment":
                    this.specialEquipment = childnode.InnerText;
                    break;

                case "ReportingLocation":
                    this.reportingLocation = new GeoOASISWhere();
                    this.reportingLocation.ReadXML(childnode.FirstChild);
                    break;

                case "WorkAssignment":
                    this.workAssignment = childnode.InnerText;
                    break;

                case "RequestedArrival":
                    this.requestedArrival = Convert.ToDateTime(childnode.InnerText);
                    break;

                case "ETA":
                    this.eta = Convert.ToDateTime(childnode.InnerText);
                    break;

                case "IncidentCommandOrganizationandAssignments":
                    this.organizationAndAssignments.ReadXML(childnode);
                    break;

                case "#comment":
                    break;

                default:
                    throw new ArgumentException("Unexpected Child Node Name: " + childnode.Name + " in ResponseResourcesDetail");
                }
            }
        }
        /// <summary>
        /// Reads an XML From An Existing DOM
        /// </summary>
        /// <param name="rootnode">Node Containing the Situation Information</param>
        internal override void ReadXML(XmlNode rootnode)
        {
            GeoOASISWhere whereTemp = new GeoOASISWhere();

            foreach (XmlNode childnode in rootnode.ChildNodes)
            {
                if (string.IsNullOrEmpty(childnode.InnerText))
                {
                    continue;
                }

                switch (childnode.LocalName)
                {
                case "IncidentName":
                    if (this.incidentName == null)
                    {
                        this.incidentName = new List <string>();
                    }

                    this.incidentName.Add(childnode.InnerText);
                    break;

                case "IncidentCause":
                    this.incidentCause = childnode.InnerText;
                    break;

                case "IncidentComplexity":
                    this.incidentComplexity = (ComplexityType)Enum.Parse(typeof(ComplexityType), childnode.InnerText);
                    break;

                case "IncidentSize":
                    this.incidentSize = childnode.InnerText;
                    break;

                case "Severity":
                    this.severity = new ValueList();
                    this.severity.ReadXML(childnode);
                    break;

                case "IncidentType":
                    this.incidentType = childnode.InnerText;
                    break;

                case "IncidentStartDateTime":
                    this.incidentStartDateTime = Convert.ToDateTime(childnode.InnerText);
                    break;

                case "IncidentLocation":
                    this.incidentLocation = new GeoOASISWhere();
                    this.incidentLocation.ReadXML(childnode.FirstChild);
                    break;

                case "IncidentStagingArea":
                    if (this.incidentStagingArea == null)
                    {
                        this.incidentStagingArea = new List <string>();
                    }

                    this.incidentStagingArea.Add(childnode.InnerText);
                    break;

                case "MapSketch":
                    this.mapSketch = childnode.InnerText;
                    break;

                case "DisasterDeclarationDateTime":
                    this.disasterDeclarationDateTime = Convert.ToDateTime(childnode.InnerText);
                    break;

                case "DisasterDeclarationAuthority":
                    this.disasterDeclarationAuthority = childnode.InnerText;
                    break;

                case "Jurisdiction":
                    if (this.jurisdicition == null)
                    {
                        this.jurisdicition = new List <GeoOASISWhere>();
                    }

                    whereTemp.ReadXML(childnode.FirstChild);
                    this.jurisdicition.Add(whereTemp);
                    break;

                case "Remarks":
                    this.remarks = childnode.InnerText;
                    break;

                case "#comment":
                    break;

                default:
                    throw new ArgumentException("Unexpected Child Node Name: " + childnode.Name + " in SituationInformation");
                }
            }
        }
示例#8
0
        /// <summary>
        /// Reads an XML From An Existing DOM
        /// </summary>
        /// <param name="rootnode">Node Containing the root Object</param>
        public void ReadXML(XmlNode rootnode)
        {
            if (rootnode.LocalName == "TEP")
            {
                ////ValueList templist;

                this.incidentType.ReadXML(rootnode);

                foreach (XmlNode childnode in rootnode.ChildNodes)
                {
                    if (string.IsNullOrEmpty(childnode.InnerText))
                    {
                        continue;
                    }

                    switch (childnode.LocalName)
                    {
                    case "ProviderUID":
                        this.providerUID = childnode.InnerText;
                        break;

                    case "PatientAge":
                        this.patientAge = int.Parse(childnode.InnerText);
                        break;

                    case "AgeUnits":
                        this.ageUnits = (AgeUnitsType)Enum.Parse(typeof(AgeUnitsType), childnode.InnerText);
                        break;

                    case "PatientGender":
                        this.patientGender = (GenderType)Enum.Parse(typeof(GenderType), childnode.InnerText, true);
                        break;

                    case "MessageID":
                        this.messageID = childnode.InnerText;
                        break;

                    case "ReportDT":
                        this.reportTime = DateTime.Parse(childnode.InnerText);
                        if (this.reportTime.Kind == DateTimeKind.Unspecified)
                        {
                            this.reportTime = DateTime.MinValue;
                            throw new ArgumentException("TimeZone Information Must Be Specified");
                        }

                        this.reportTime = this.reportTime.ToUniversalTime();
                        break;

                    case "ProviderInfo":
                        this.providerInfo = new ProviderInfoType();
                        this.providerInfo.ReadXML(childnode);
                        break;

                    case "TreatmentInfo":
                        this.treatmentInfo = new TreatmentInfoType();
                        this.treatmentInfo.ReadXML(childnode);
                        break;

                    case "TriageStatus":
                        this.triageStatus = (TriageStatusType)Enum.Parse(typeof(TriageStatusType), childnode.InnerText);
                        break;

                    case "PatientUID":
                        this.patientUID = childnode.InnerText;
                        break;

                    case "IncidentType":
                        /*if (childnode.ChildNodes.Count == 0)
                         * //{
                         * //  break;
                         * //}
                         * //else if (childnode.ChildNodes.Count == 1)
                         * //{
                         * //  templist = new ValueList();
                         * //  templist.ReadXML(childnode.FirstChild);
                         * //  this.incidentType.Add(templist);
                         * //}
                         * //else
                         * //{
                         * //  throw new ArgumentException("Unexpected Number of Child Nodes for ValueList in TEP");
                         * //}*/
                        if (childnode.ChildNodes.Count > 1)
                        {
                            throw new ArgumentException("Unexpected Number of Child Nodes for ValueList in TEP");
                        }

                        break;

                    case "IncidentID":
                        this.incidentID = childnode.InnerText;
                        break;

                    case "Location":
                        if (childnode.ChildNodes.Count == 0)
                        {
                            break;
                        }
                        else if (childnode.ChildNodes.Count == 1)
                        {
                            this.location = new GeoOASISWhere();
                            this.location.ReadXML(childnode.FirstChild);
                        }
                        else
                        {
                            throw new ArgumentException("Unexpected Number of Child Nodes for GeoOASISWhere in TEP");
                        }

                        break;

                    case "PatientInfo":
                        this.patientInfo = new PatientInfoType();
                        this.patientInfo.ReadXML(childnode);
                        break;

                    case "FormImage":
                        this.Base64ImageData = childnode.InnerText;
                        break;

                    case "TransportInfo":
                        this.transportInfo = new TransportInfoType();
                        this.transportInfo.ReadXML(childnode);
                        break;

                    case "#comment":
                        break;

                    default:
                        throw new ArgumentException("Unexpected Child Node Name: " + childnode.Name + " in TEP");
                    }
                }
            }
            else
            {
                throw new ArgumentException("Unexpected Root Node Name: " + rootnode.Name + " in TEP");
            }

            this.Validate();
        }
示例#9
0
        /// <summary>
        /// Reads an XML From An Existing DOM
        /// </summary>
        /// <param name="rootnode">Node Containing the root Object</param>
        internal override void ReadXML(XmlNode rootnode)
        {
            VitalSignsType vitals;

            if (rootnode.LocalName == "TreatmentInfo")
            {
                foreach (XmlNode childnode in rootnode.ChildNodes)
                {
                    if (string.IsNullOrEmpty(childnode.InnerText))
                    {
                        continue;
                    }

                    switch (childnode.LocalName)
                    {
                    case "EncounterID":
                        this.encounterID = childnode.InnerText;
                        break;

                    case "EncounterDateTime":
                        this.encounterDateTime = DateTime.Parse(childnode.InnerText);
                        if (this.encounterDateTime.Kind == DateTimeKind.Unspecified)
                        {
                            this.encounterDateTime = DateTime.MinValue;
                            throw new ArgumentException("TimeZone Information Must Be Specified");
                        }

                        this.encounterDateTime = this.encounterDateTime.ToUniversalTime();
                        break;

                    case "TreatmentLocation":
                        this.treatmentLocation = new GeoOASISWhere();
                        this.treatmentLocation.ReadXML(childnode.ChildNodes[0]);
                        break;

                    case "HazardInfo":
                        this.hazardInfo = childnode.InnerText;
                        break;

                    case "CurrentDisposition":
                        this.currentDisposition = childnode.InnerText;
                        break;

                    case "TreatmentDateTime":
                        this.treatmentDateTime = DateTime.Parse(childnode.InnerText);
                        break;

                    case "ChiefComplaint":
                        this.chiefComplaint = childnode.InnerText;
                        break;

                    case "MedicationsAdministered":
                        foreach (XmlNode node in childnode.ChildNodes)
                        {
                            this.medicationsAdministered.Add(node.InnerText);
                        }

                        break;

                    case "ProcedurePerformed":
                        foreach (XmlNode node in childnode.ChildNodes)
                        {
                            this.procedurePerformed.Add(node.InnerText);
                        }

                        break;

                    case "FieldTraumaCriteria":
                        foreach (XmlNode node in childnode.ChildNodes)
                        {
                            this.fieldTraumaCriteria.Add(node.InnerText);
                        }

                        break;

                    case "PresentingProblem":
                        this.presentingProblem = childnode.InnerText;
                        break;

                    case "VitalSigns":
                        vitals = new VitalSignsType();
                        vitals.ReadXML(childnode);
                        this.vitalSigns.Add(vitals);
                        break;

                    case "#comment":
                        break;

                    default:
                        throw new ArgumentException("Unexpected Child Node Name: " + childnode.Name + " in TreatmentInfoType");
                    }
                }
            }
            else
            {
                throw new ArgumentException("Unexcepted Root Node Name: " + rootnode.Name + " in TreatmentInfoType");
            }
        }