README.md in ncs_mdes-0.11.0 vs README.md in ncs_mdes-0.12.0

- old
+ new

@@ -22,40 +22,50 @@ {NcsNavigator::Mdes::Specification}. (If you're not looking at this document in the API documentation, try looking at [rubydoc.info][].) [rubydoc.info]: http://rubydoc.info/github/NUBIC/ncs_mdes/master/frames +As of ncs_mdes 0.12.0, only Ruby 1.9.3+ is supported. + ### Examine This gem includes a console for interactively analyzing and randomly poking at the MDES. It is called `mdes-console`: $ mdes-console Documents are expected to be in the default location. $mdesNM is a Specification for N.M. Available specifications are $mdes12, $mdes20, $mdes21, $mdes22, and $mdes30. - ruby-1.9.3-p125 :001 > + :001 > It is based on ruby's IRB. Use it to examine the loaded MDES data without a lot of edit-save-run cycles: - ruby-1.9.3-p125 :001 > $mdes20.transmission_tables.first.name + :001 > $mdes20.transmission_tables.first.name => "study_center" E.g., find all the variables of a particular XML schema type: - ruby-1.9.3-p125 :002 > $mdes20.transmission_tables.collect { |t| t.variables }.flatten.select { |v| v.type.base_type == :decimal }.collect(&:name) + :002 > $mdes20.transmission_tables.collect { |t| t.variables }.flatten.select { |v| v.type.base_type == :decimal }.collect(&:name) => ["correction_factor_temp", "current_temp", "maximum_temp", "minimum_temp", "precision_term_temp", "trh_temp", "salts_moist", "s_33rh_reading", "s_75rh_reading", "s_33rh_reading_calib", "s_75rh_reading_calib", "precision_term_temp", "rf_temp", "correction_factor_temp", "sample_receipt_temp"] Or the labels for a particular code list: - ruby-1.9.3-p125 :003 > $mdes20.types.find { |t| t.name == 'confirm_type_cl7' }.code_list.collect(&:label) + :003 > $mdes20.types.find { |t| t.name == 'confirm_type_cl7' }.code_list.collect(&:label) => ["Yes", "No", "Refused", "Don't Know", "Legitimate Skip", "Missing in Error"] Or the number of code lists that include "Yes" as an option: - ruby-1.9.3-p125 :004 > $mdes20.types.select { |t| t.code_list && t.code_list.collect(&:label).include?('Yes') }.size + :004 > $mdes20.types.select { |t| t.code_list && t.code_list.collect(&:label).include?('Yes') }.size => 23 + +Or which variables in a table are different between two versions: + + :005 > pp $mdes20['staff'].diff($mdes32['staff'])[:variables]; nil + #<NcsNavigator::Mdes::Differences::Collection:0x007fdd8bb4dff0 + @entry_differences={}, + @left_only=[], + @right_only=["ncs_active_date", "ncs_inactive_date"]> Develop ------- ### Writing API docs