Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- MedicationSchedule.*,
- MedicationScheduleItem.*,
- MedicationScheduleItemRepeat.RepeatTimeSpan AS RepeatTimeSpan,
- Patient.*,
- Medication.*,
- MedicationType.Name AS TYPE,
- Measure.Name AS Measure,
- MedicationBrand.*
- FROM MedicationScheduleItem
- JOIN MedicationSchedule ON (MedicationSchedule.Id = MedicationScheduleItem.MedicationScheduleId)
- JOIN Patient ON (Patient.Id = MedicationSchedule.PatientId)
- JOIN Medication ON (Medication.Id = MedicationScheduleItem.MedicationId)
- JOIN MedicationBrand ON (MedicationBrand.Id = Medication.MedicationBrandId)
- JOIN MedicationType ON (MedicationType.Id = Medication.MedicationTypeId)
- JOIN Measure ON (Measure.Id = Medication.MeasureId)
- LEFT JOIN MedicationScheduleItemRepeat ON (MedicationScheduleItemRepeat.MedicationScheduleItemId = MedicationScheduleItem.Id)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement