Exemplo n.º 1
0
        public void LoadFromXml(XmlNode node)
        {
            this.DocInfo = new MmlDocumentInfo(node.SelectSingleNode("docInfo"));
            XmlNamespaceManager nsmgr = new XmlNamespaceManager(node.OwnerDocument.NameTable);

            XmlNode content = node.SelectSingleNode("content");

            if (this.DocInfo.ContentModuleType == "patientInfo")
            {
                nsmgr.AddNamespace(MmlPi.PatientModule.NameSpacePrefix, MmlPi.PatientModule.NameSpaceURI);
                this.Content = new MmlPi.PatientModule(content.SelectSingleNode("mmlPi:PatientModule", nsmgr));
            }
            else if (this.DocInfo.ContentModuleType == "healthInsurance")
            {
                nsmgr.AddNamespace(MmlHi.HealthInsurance.NameSpacePrefix, MmlHi.HealthInsurance.NameSpaceURI);
                this.Content = new MmlHi.HealthInsurance(content.SelectSingleNode("mmlHi:HealthInsuranceModule", nsmgr));
            }
            else if (this.DocInfo.ContentModuleType == "registeredDiagnosis")
            {
                nsmgr.AddNamespace(MmlRd.RegisteredDiagnosisModule.NameSpacePrefix, MmlRd.RegisteredDiagnosisModule.NameSpaceURI);
                this.Content = new MmlRd.RegisteredDiagnosisModule(content.SelectSingleNode("mmlRd:RegisteredDiagnosisModule", nsmgr));
            }
            else if (this.DocInfo.ContentModuleType == "lifestyle")
            {
            }
            else if (this.DocInfo.ContentModuleType == "baseClinic")
            {
            }
            else if (this.DocInfo.ContentModuleType == "firstClinic")
            {
            }
            else if (this.DocInfo.ContentModuleType == "progressCourse")
            {
            }
            else if (this.DocInfo.ContentModuleType == "surgery")
            {
            }
            else if (this.DocInfo.ContentModuleType == "summary")
            {
            }
            else if (this.DocInfo.ContentModuleType == "claim")
            {
                nsmgr.AddNamespace(Claim.ClaimModule.NameSpacePrefix, Claim.ClaimModule.NameSpaceURI);
                this.Content = new Claim.ClaimModule(content.SelectSingleNode("claim:ClaimModule", nsmgr));
            }
            else if (this.DocInfo.ContentModuleType == "claimAmount")
            {
            }
            else if (this.DocInfo.ContentModuleType == "referral")
            {
            }
            else if (this.DocInfo.ContentModuleType == "test")
            {
            }
            else if (this.DocInfo.ContentModuleType == "report")
            {
            }
            else
            {
                throw new XmlException("ContentModuleTypeが対象外です。:" + this.DocInfo.ContentModuleType);
            }
        }
Exemplo n.º 2
0
 public MmlModuleItem()
 {
     this.DocInfo = new MmlDocumentInfo();
     this.Content = null;
 }