private void FillProvInfo() { textOrderingProvIdentifier.Text = EhrLabCur.OrderingProviderID; textOrderingProvLastName.Text = EhrLabCur.OrderingProviderLName; textOrderingProvFirstName.Text = EhrLabCur.OrderingProviderFName; textOrderingProvMiddleName.Text = EhrLabCur.OrderingProviderMiddleNames; textOrderingProvSuffix.Text = EhrLabCur.OrderingProviderSuffix; textOrderingProvPrefix.Text = EhrLabCur.OrderingProviderPrefix; textOrderingProvAANID.Text = EhrLabCur.OrderingProviderAssigningAuthorityNamespaceID; textOrderingProvAAUID.Text = EhrLabCur.OrderingProviderAssigningAuthorityUniversalID; textOrderingProvAAUIDType.Text = EhrLabCur.OrderingProviderAssigningAuthorityIDType; #region Name Type comboOrderingProvNameType.Items.Clear(); comboOrderingProvNameType.BeginUpdate(); //Fill medical director name combo with HL70200 enum. Not sure if blank is acceptable. List <string> listOrderingProvNameType = EhrLabResults.GetHL70200Descriptions(); comboOrderingProvNameType.Items.AddRange(listOrderingProvNameType.ToArray()); comboOrderingProvNameType.EndUpdate(); comboOrderingProvNameType.SelectedIndex = (int)Enum.Parse(typeof(HL70200), EhrLabCur.OrderingProviderNameTypeCode.ToString(), true) + 1; #endregion #region Identifier Type comboOrderingProvIdType.Items.Clear(); comboOrderingProvIdType.BeginUpdate(); //Fill medical director type combo with HL70203 enum. Not sure if blank is acceptable. List <string> listOrderingProvIdType = EhrLabs.GetHL70203Descriptions(); comboOrderingProvIdType.Items.AddRange(listOrderingProvIdType.ToArray()); comboOrderingProvIdType.EndUpdate(); comboOrderingProvIdType.SelectedIndex = (int)Enum.Parse(typeof(HL70203), EhrLabCur.OrderingProviderIdentifierTypeCode.ToString(), true) + 1; #endregion }
private void FormLabResultEdit_Load(object sender, EventArgs e) { if (IsImport || IsViewOnly) { foreach (Control c in this.Controls) { c.Enabled = false; } butCancel.Enabled = true; butCancel.Text = "Close"; gridNotes.Enabled = true; //butAddNote.Enabled=false; //butObsIdLoinc.Enabled=false; //butCodedElementSnomed.Enabled=false; //butUnitOfMeasureUCUM.Enabled=false; //butOk.Enabled=false; //combos } //textObsDateTime.Text=EhrLab.formatDateFromHL7(EhrLabResultCur.ObservationDateTime); //textAnalysisDateTime.Text=EhrLab.formatDateFromHL7(EhrLabResultCur.AnalysisDateTime); #region Observation Identifier (LOINC Codes) textObsIDCodeSystemName.Text = EhrLabResultCur.ObservationIdentifierCodeSystemName; textObsID.Text = EhrLabResultCur.ObservationIdentifierID; textObsIDText.Text = EhrLabResultCur.ObservationIdentifierText; textObsIDCodeSystemNameAlt.Text = EhrLabResultCur.ObservationIdentifierCodeSystemNameAlt; textObsIDAlt.Text = EhrLabResultCur.ObservationIdentifierIDAlt; textObsIDTextAlt.Text = EhrLabResultCur.ObservationIdentifierTextAlt; textObsIDOrigText.Text = EhrLabResultCur.ObservationIdentifierTextOriginal; textObsSub.Text = EhrLabResultCur.ObservationIdentifierSub; #endregion #region Abnormal Flags listAbnormalFlags.Items.Clear(); listAbnormalFlags.BeginUpdate(); List <string> listAbnormalFlagsStr = EhrLabResults.GetHL70078Descriptions(); listAbnormalFlags.Items.AddRange(listAbnormalFlagsStr.ToArray()); listAbnormalFlags.EndUpdate(); string[] abnormalFlags = EhrLabResultCur.AbnormalFlags.Split(','); for (int i = 0; i < abnormalFlags.Length; i++) { if (abnormalFlags[i] == "") { continue; } listAbnormalFlags.SetSelected((int)Enum.Parse(typeof(HL70078), abnormalFlags[i], true), true); } #endregion #region Observation Value textObsDateTime.Text = EhrLab.formatDateFromHL7(EhrLabResultCur.ObservationDateTime); textAnalysisDateTime.Text = EhrLab.formatDateFromHL7(EhrLabResultCur.AnalysisDateTime); #region Observation Status comboObsStatus.Items.Clear(); comboObsStatus.BeginUpdate(); //Fill obs status combo with HL70085 enum. Not sure if blank is acceptable. List <string> listObsStatus = EhrLabResults.GetHL70085Descriptions(); comboObsStatus.Items.AddRange(listObsStatus.ToArray()); comboObsStatus.EndUpdate(); comboObsStatus.SelectedIndex = (int)Enum.Parse(typeof(HL70085), EhrLabResultCur.ObservationResultStatus.ToString(), true) + 1; #endregion #region Value Type comboObsValueType.Items.Clear(); comboObsValueType.BeginUpdate(); //Fill obs value type combo with HL70125 enum. Not sure if blank is acceptable. List <string> listObsValueType = EhrLabResults.GetHL70125Descriptions(); comboObsValueType.Items.AddRange(listObsValueType.ToArray()); comboObsValueType.EndUpdate(); comboObsValueType.SelectedIndex = (int)Enum.Parse(typeof(HL70125), EhrLabResultCur.ValueType.ToString(), true) + 1; #endregion textObsValue.Text = GetObservationText(); #region Coded Elements textObsElementCodeSystem.Text = EhrLabResultCur.ObservationValueCodedElementCodeSystemName; textObsElementID.Text = EhrLabResultCur.ObservationValueCodedElementID; textObsElementText.Text = EhrLabResultCur.ObservationValueCodedElementText; textObsElementCodeSystemAlt.Text = EhrLabResultCur.ObservationValueCodedElementCodeSystemNameAlt; textObsElementIDAlt.Text = EhrLabResultCur.ObservationValueCodedElementIDAlt; textObsElementTextAlt.Text = EhrLabResultCur.ObservationValueCodedElementTextAlt; textObsElementOrigText.Text = EhrLabResultCur.ObservationValueCodedElementTextOriginal; #endregion #region Structured Numeric textStructNumComp.Text = EhrLabResultCur.ObservationValueComparator; textStructNumFirst.Text = EhrLabResultCur.ObservationValueNumber1.ToString(); textStructNumSeparator.Text = EhrLabResultCur.ObservationValueSeparatorOrSuffix; textStructNumSecond.Text = EhrLabResultCur.ObservationValueNumber2.ToString(); #endregion #region Unit of Measure textObsUnitsCodeSystem.Text = EhrLabResultCur.UnitsCodeSystemName; textObsUnitsID.Text = EhrLabResultCur.UnitsID; textObsUnitsText.Text = EhrLabResultCur.UnitsText; textObsUnitsCodeSystemAlt.Text = EhrLabResultCur.UnitsCodeSystemNameAlt; textObsUnitsIDAlt.Text = EhrLabResultCur.UnitsIDAlt; textObsUnitsTextAlt.Text = EhrLabResultCur.UnitsTextAlt; textObsUnitsTextOrig.Text = EhrLabResultCur.UnitsTextOriginal; #endregion #endregion #region Performing Organization #region Name textPerfOrgName.Text = EhrLabResultCur.PerformingOrganizationName; #region Identifier Type comboPerfOrgIdType.Items.Clear(); comboPerfOrgIdType.BeginUpdate(); //Fill identifier type combo with HL70203 enum. Not sure if blank is acceptable. List <string> listPerfOrgIdType = EhrLabs.GetHL70203Descriptions(); comboPerfOrgIdType.Items.AddRange(listPerfOrgIdType.ToArray()); comboPerfOrgIdType.EndUpdate(); comboPerfOrgIdType.SelectedIndex = (int)Enum.Parse(typeof(HL70203), EhrLabResultCur.PerformingOrganizationIdentifierTypeCode.ToString(), true) + 1; #endregion textPerfOrgIdentifier.Text = EhrLabResultCur.PerformingOrganizationIdentifier; #region Assigning Authority textPerfOrgAssignIdType.Text = EhrLabResultCur.PerformingOrganizationNameAssigningAuthorityUniversalIdType; textPerfOrgNamespaceID.Text = EhrLabResultCur.PerformingOrganizationNameAssigningAuthorityNamespaceId; textPerfOrgUniversalID.Text = EhrLabResultCur.PerformingOrganizationNameAssigningAuthorityUniversalId; #endregion #endregion #region Address #region Address Type comboPerfOrgAddressType.Items.Clear(); comboPerfOrgAddressType.BeginUpdate(); //Fill address type combo with HL70190 enum. Not sure if blank is acceptable. List <string> listPerfOrgAddressType = EhrLabResults.GetHL70190Descriptions(); comboPerfOrgAddressType.Items.AddRange(listPerfOrgAddressType.ToArray()); comboPerfOrgAddressType.EndUpdate(); comboPerfOrgAddressType.SelectedIndex = (int)Enum.Parse(typeof(HL70190), EhrLabResultCur.PerformingOrganizationAddressAddressType.ToString(), true) + 1; #endregion textPerfOrgStreet.Text = EhrLabResultCur.PerformingOrganizationAddressStreet; textPerfOrgOtherDesignation.Text = EhrLabResultCur.PerformingOrganizationAddressOtherDesignation; textPerfOrgCity.Text = EhrLabResultCur.PerformingOrganizationAddressCity; #region State or Province comboPerfOrgState.Items.Clear(); comboPerfOrgState.BeginUpdate(); //Fill state combo with USPSAlphaStateCode enum. Not sure if blank is acceptable. List <string> listPerfOrgState = EhrLabResults.GetUSPSAlphaStateCodeDescriptions(); comboPerfOrgState.Items.AddRange(listPerfOrgState.ToArray()); comboPerfOrgState.EndUpdate(); comboPerfOrgState.SelectedIndex = (int)Enum.Parse(typeof(USPSAlphaStateCode), EhrLabResultCur.PerformingOrganizationAddressStateOrProvince.ToString(), true) + 1; #endregion textPerfOrgZip.Text = EhrLabResultCur.PerformingOrganizationAddressZipOrPostalCode; textPerfOrgCountry.Text = EhrLabResultCur.PerformingOrganizationAddressCountryCode; textPerfOrgCounty.Text = EhrLabResultCur.PerformingOrganizationAddressCountyOrParishCode; #endregion #region Medical Director #region Identifier Type comboMedDirIdType.Items.Clear(); comboMedDirIdType.BeginUpdate(); //Fill medical director type combo with HL70203 enum. Not sure if blank is acceptable. List <string> listMedDirIdType = EhrLabs.GetHL70203Descriptions(); comboMedDirIdType.Items.AddRange(listMedDirIdType.ToArray()); comboMedDirIdType.EndUpdate(); comboMedDirIdType.SelectedIndex = (int)Enum.Parse(typeof(HL70203), EhrLabResultCur.MedicalDirectorIdentifierTypeCode.ToString(), true) + 1; #endregion textMedDirIdentifier.Text = EhrLabResultCur.MedicalDirectorID; #region Name Type comboMedDirNameType.Items.Clear(); comboMedDirNameType.BeginUpdate(); //Fill medical director name combo with HL70200 enum. Not sure if blank is acceptable. List <string> listMedDirNameType = EhrLabResults.GetHL70200Descriptions(); comboMedDirNameType.Items.AddRange(listMedDirIdType.ToArray()); comboMedDirNameType.EndUpdate(); comboMedDirNameType.SelectedIndex = (int)Enum.Parse(typeof(HL70200), EhrLabResultCur.MedicalDirectorNameTypeCode.ToString(), true) + 1; #endregion textMedDirLastName.Text = EhrLabResultCur.MedicalDirectorLName; textMedDirFirstName.Text = EhrLabResultCur.MedicalDirectorFName; textMedDirMiddleName.Text = EhrLabResultCur.MedicalDirectorMiddleNames; textMedDirSuffix.Text = EhrLabResultCur.MedicalDirectorSuffix; textMedDirPrefix.Text = EhrLabResultCur.MedicalDirectorPrefix; #region Assigning Authority textMedDirAssignIdType.Text = EhrLabResultCur.MedicalDirectorAssigningAuthorityIDType; textMedDirNamespaceID.Text = EhrLabResultCur.MedicalDirectorAssigningAuthorityNamespaceID; textMedDirUniversalID.Text = EhrLabResultCur.MedicalDirectorAssigningAuthorityUniversalID; #endregion #endregion #endregion textReferenceRange.Text = EhrLabResultCur.referenceRange; FillGridNotes(); }