Sha256: 275554e19a6c4c6a94744c3f6034f1eab7c73be7d89827a8b67912e2163f7d7f

Contents?: true

Size: 1.05 KB

Versions: 33

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

# What are observations in RW?
# - clinic visit
#   - weight
#   - bp
xml = builder

xml.Observations(
  start: patient.changes_since.to_date.iso8601,
  stop: patient.changes_up_until.to_date.iso8601
) do
  patient.clinic_visits.each do |visit|
    render "clinic_visit_observation",
           visit: visit,
           method: :systolic_bp,
           i18n_key: "blood_pressure.systolic",
           builder: builder

    render "clinic_visit_observation",
           visit: visit,
           method: :diastolic_bp,
           i18n_key: "blood_pressure.diastolic",
           builder: builder

    render "clinic_visit_observation",
           visit: visit,
           method: :weight,
           i18n_key: "weight",
           builder: builder

    render "clinic_visit_observation",
           visit: visit,
           method: :height_in_cm,
           i18n_key: "height",
           builder: builder
  end
  patient.finished_hd_sessions.each do |session|
    render "hd_session_observations", session: session, builder: builder
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
renalware-core-2.0.136 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.135 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.134 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.133 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.132 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.131 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.130 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.129 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.128 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.127 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.126 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.125 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.124 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.123 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.121 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.120 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.119 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.118 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.117 app/views/renalware/api/ukrdc/patients/_observations.xml.builder
renalware-core-2.0.116 app/views/renalware/api/ukrdc/patients/_observations.xml.builder