private void fillCombos() { //Units of measure---------------------------------------- _listUCUM = Ucums.GetAll(); if (_listUCUM.Count == 0) { MsgBox.Show(this, "Units of measure have not been imported. Go to the code system importer window to import UCUM codes to continue."); DialogResult = DialogResult.Cancel; return; } int _tempSelectedIndex = 0; for (int i = 0; i < _listUCUM.Count; i++) { comboUnits.Items.Add(_listUCUM[i].UcumCode); if (_listUCUM[i].UcumCode == "mg/dL") //arbitrarily chosen common unit of measure. { _tempSelectedIndex = i; } } comboUnits.SelectedIndex = _tempSelectedIndex; //Lab Value Type. Based off of the HL70125 data type (Value Type)---------------------------------------- comboLabValueType.Items.Add("Coded Entry"); comboLabValueType.Items.Add("Coded with Exceptions"); comboLabValueType.Items.Add("Date"); comboLabValueType.Items.Add("Formatted Text"); comboLabValueType.Items.Add("Numeric"); //default comboLabValueType.Items.Add("Structured Numeric"); comboLabValueType.Items.Add("String Data"); comboLabValueType.Items.Add("Time"); comboLabValueType.Items.Add("Time Stamp"); comboLabValueType.Items.Add("Text Data"); comboLabValueType.SelectedIndex = 4; //Numeric. This is what we used to assume all lab results were like. }
private void fillCombos() { comboComparator.Items.Add("="); comboComparator.Items.Add(">="); comboComparator.Items.Add(">"); comboComparator.Items.Add("<"); comboComparator.Items.Add("<="); comboComparator.SelectedIndex = 0; //not sure if this code works. Test it. _listUCUM = Ucums.GetAll(); if (_listUCUM.Count == 0) { MsgBox.Show(this, "Units of measure have not been imported. Go to the code system importer window to import UCUM codes to continue."); DialogResult = DialogResult.Cancel; return; } int _tempSelectedIndex = 0; for (int i = 0; i < _listUCUM.Count; i++) { comboUnits.Items.Add(_listUCUM[i].UcumCode); if (_listUCUM[i].UcumCode == "mg/dL") //arbitrarily chosen common unit of measure. { _tempSelectedIndex = i; } } comboUnits.SelectedIndex = _tempSelectedIndex; }