Module: Services::MdsAssessmentCategorizer
- Included in:
- MdsAssessment
- Defined in:
- app/roles/services/mds_assessment_categorizer.rb
Instance Method Summary collapse
- #a0310f_99? ⇒ Boolean
- #admission_assessment? ⇒ Boolean
- #any_type_of_correction_assessment? ⇒ Boolean
- #correction_applied? ⇒ Boolean
- #correction_record? ⇒ Boolean
- #death_assessment? ⇒ Boolean
- #discharge_assessment? ⇒ Boolean
- #discharge_or_death_assessment? ⇒ Boolean
- #entered_from_hospital? ⇒ Boolean
- #entry_assessment? ⇒ Boolean
- #inactivated? ⇒ Boolean
- #inactivation_assessment? ⇒ Boolean
- #ninety_day? ⇒ Boolean
- #quarterly? ⇒ Boolean
- #significant_correction_assessment? ⇒ Boolean
- #tracking_assessment? ⇒ Boolean
Instance Method Details
#a0310f_99? ⇒ Boolean
65 66 67 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 65 def a0310f_99? responses.present? && a0310f == "99" end |
#admission_assessment? ⇒ Boolean
9 10 11 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 9 def admission_assessment? a0310a.to_i == 1 end |
#any_type_of_correction_assessment? ⇒ Boolean
13 14 15 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 13 def any_type_of_correction_assessment? significant_correction_assessment? || correction_record? end |
#correction_applied? ⇒ Boolean
21 22 23 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 21 def correction_applied? responses.present? && prior_isc_cd.present? end |
#correction_record? ⇒ Boolean
17 18 19 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 17 def correction_record? responses.present? && version == MdsAssessment::VERSION1_0 ? x0100 == "2" : a0050 == "2" end |
#death_assessment? ⇒ Boolean
37 38 39 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 37 def death_assessment? responses.present? && a0310f.to_i == 12 end |
#discharge_assessment? ⇒ Boolean
33 34 35 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 33 def discharge_assessment? responses.present? && a0310f.to_i == 10 || a0310f.to_i == 11 end |
#discharge_or_death_assessment? ⇒ Boolean
41 42 43 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 41 def discharge_or_death_assessment? discharge_assessment? || death_assessment? end |
#entered_from_hospital? ⇒ Boolean
61 62 63 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 61 def entered_from_hospital? responses.present? && a1800 == "03" end |
#entry_assessment? ⇒ Boolean
29 30 31 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 29 def entry_assessment? responses.present? && a0310f.to_i == 1 end |
#inactivated? ⇒ Boolean
25 26 27 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 25 def inactivated? responses.present? && (corrected? && prior_isc_cd.blank?) end |
#inactivation_assessment? ⇒ Boolean
57 58 59 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 57 def inactivation_assessment? responses.present? && itm_sbst_cd == IscCode.inactivation_code end |
#ninety_day? ⇒ Boolean
53 54 55 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 53 def ninety_day? responses.present? && a0310b == "05" end |
#quarterly? ⇒ Boolean
49 50 51 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 49 def quarterly? responses.present? && a0310a == "02" end |
#significant_correction_assessment? ⇒ Boolean
5 6 7 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 5 def significant_correction_assessment? responses.present? && %w{ 05 06 }.include?(a0310a) end |
#tracking_assessment? ⇒ Boolean
45 46 47 |
# File 'app/roles/services/mds_assessment_categorizer.rb', line 45 def tracking_assessment? responses.present? && %w{ NT ST }.include?(itm_sbst_cd) end |