Sha256: 6b7a8629f0095275e8a3369d53ca4795f2258925d61d298ccc4ddfb371949293

Contents?: true

Size: 875 Bytes

Versions: 161

Compression:

Stored size: 875 Bytes

Contents

 SELECT mp.id,
    mp.patient_id,
    mp.drug_id,
    mp.treatable_type,
    mp.treatable_id,
    mp.dose_amount,
    mp.dose_unit,
    mp.medication_route_id,
    mp.route_description,
    mp.frequency,
    mp.notes,
    mp.prescribed_on,
    mp.provider,
    mp.created_at,
    mp.updated_at,
    mp.created_by_id,
    mp.updated_by_id,
    mp.administer_on_hd,
    mp.last_delivery_date,
    drugs.name as drug_name,
    drug_types.code AS drug_type_code,
    drug_types.name AS drug_type_name
   FROM medication_prescriptions mp
     FULL JOIN medication_prescription_terminations mpt ON mpt.prescription_id = mp.id
     JOIN drugs ON drugs.id = mp.drug_id
     FULL JOIN drug_types_drugs ON drug_types_drugs.drug_id = drugs.id
     FULL JOIN drug_types ON drug_types_drugs.drug_type_id = drug_types.id
      AND (mpt.terminated_on IS NULL OR mpt.terminated_on > now());

Version data entries

161 entries across 161 versions & 1 rubygems

Version Path
renalware-core-2.0.158 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.157 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.156 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.155 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.153 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.152 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.151 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.149 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.148 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.147 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.146 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.145 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.144 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.143 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.142 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.141 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.140 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.139 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.138 db/views/medication_current_prescriptions_v01.sql
renalware-core-2.0.137 db/views/medication_current_prescriptions_v01.sql