Class: FHIR::Completeness

Inherits:
Rubrics
  • Object
show all
Defined in:
lib/rubrics/completeness.rb

Constant Summary collapse

REQUIRED =
[
  'AllergyIntolerance','Condition','CarePlan','Immunization',
  'Observation','Encounter'
]
EXPECTED =
[ 
  'FamilyMemberHistory','DiagnosticReport','ImagingStudy','VisionPrescription',
  'Practitioner','Organization','Communication','Appointment','DeviceUseStatement',
  'QuestionnaireResponse','Coverage'
]
MEDICATIONS =
[ 'MedicationStatement','MedicationDispense','MedicationAdministration','MedicationRequest' ]

Class Method Summary collapse

Methods inherited from Rubrics

apply, response, rubric

Class Method Details

.get_vital_code(codeableconcept) ⇒ Object



52
53
54
55
56
57
58
# File 'lib/rubrics/completeness.rb', line 52

def self.get_vital_code(codeableconcept)
  return nil if codeableconcept.nil? || codeableconcept.coding.nil?

  coding = codeableconcept.coding.find{|x| x.system=='http://loinc.org' && VITAL_SIGNS.has_key?(x.code)}
  code = coding.code if coding
  code
end