lib/hqmf-parser/converter/pass1/document_converter.rb in hqmf-parser-1.0.6 vs lib/hqmf-parser/converter/pass1/document_converter.rb in hqmf-parser-1.1.0

- old
+ new

@@ -96,11 +96,11 @@ # this is looking for a birthdate characteristic that is set as a generic characteristic but points to a loinc code set if (value_set['LOINC'] and value_set['LOINC'].first == '21112-8') data_criteria.definition = 'patient_characteristic_birthdate' end # this is looking for a gender characteristic that is set as a generic characteristic - gender_key = (value_set.keys.select {|set| set.start_with? 'HL7'}).first - if (gender_key and ['M','F'].include? value_set[gender_key].first) + gender_key = (value_set.keys.select {|set| set == 'Administrative Sex' || set == 'AdministrativeSex'}).first + if (gender_key and ['M','F'].include? value_set[gender_key].first) data_criteria.definition = 'patient_characteristic_gender' data_criteria.value = HQMF::Coded.new('CD','Gender',value_set[gender_key].first) end end end