예제 #1
0
파일: Form1.cs 프로젝트: hr4e/csharp
 private void comboBoxScribeList_SelectedIndexChanged(object sender, EventArgs e)
 {
     stationScribe = clinicData.GetProviderStruct(comboBoxScribeList.Text);
 }
예제 #2
0
파일: XMLHandler.cs 프로젝트: hr4e/csharp
        private void ReadCareProviders(XmlTextReader textReader)
        {
            bool inCareProviders = true;
            while (inCareProviders)
            {
                textReader.Read();
                switch (textReader.LocalName)
                {
                    case "healthcareProviders":
                        inCareProviders = false;
                        break;
                    case "careProvisionDateRange":
                        textReader.Read();
                        patientForm.clinicData.clinicStartDate = textReader.GetAttribute(0);
                        textReader.Read();
                        patientForm.clinicData.clinicEndDate = textReader.GetAttribute(0);
                        textReader.Read();
                        break;
                    case "healthcareProvider":
                        Provider newProvider = new Provider();
                        bool buildProvider = true;
                        while (buildProvider)
                        {
                            textReader.Read();
                            switch (textReader.LocalName)
                            {
                                case "healthcareProvider":
                                    buildProvider = false;
                                    break;
                                case "role":
                                    newProvider.roleCode = textReader.GetAttribute(0);
                                    newProvider.roleCodeSystem = textReader.GetAttribute(1);
                                    textReader.Read();
                                    textReader.Read();
                                    newProvider.roleDescription = textReader.Value.ToString();
                                    textReader.Read();
                                    textReader.Read();
                                    break;
                                case "dateRange":
                                    textReader.Read();
                                    newProvider.dateStart = textReader.GetAttribute(0);
                                    textReader.Read();
                                    newProvider.dateEnd = textReader.GetAttribute(0);
                                    textReader.Read();
                                    break;
                                case "comment":
                                    textReader.Read();
                                    textReader.Read();
                                    newProvider.comment = textReader.Value.ToString();
                                    textReader.Read();
                                    textReader.Read();
                                    break;
                                case "providerEntity":
                                    bool inProvider = true;
                                    while (inProvider)
                                    {
                                        textReader.Read();
                                        switch (textReader.LocalName)
                                        {
                                            case "providerEntity":
                                                inProvider = false;
                                                break;
                                            case "providerID":
                                                newProvider.id = textReader.GetAttribute(0);
                                                break;
                                            case "prefix":
                                                textReader.Read();
                                                newProvider.prefix = textReader.Value.ToString();
                                                textReader.Read();
                                                break;
                                            case "given":
                                                textReader.Read();
                                                newProvider.firstName = textReader.Value.ToString();
                                                textReader.Read();
                                                break;
                                            case "family":
                                                textReader.Read();
                                                newProvider.lastName = textReader.Value.ToString();
                                                textReader.Read();
                                                break;
                                            case "providerOrganizationName":
                                                textReader.Read();
                                                newProvider.organizationName = textReader.Value.ToString();
                                                textReader.Read();
                                                break;
                                        }
                                    }

                                    break;
                            }
                        }
                        patientForm.clinicData.providers.Add(newProvider);
                        break;
                }
            }
        }