Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simao Mazive | MPOC-704 Include Date for next Drug Pickup #274

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion openmrs/apps/reports/sql/Patient_With_ARV_Drug_Pickups.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ SELECT DISTINCT
'Sim'
END
AS "Levantou ARV (S/N)",
DATE_FORMAT(edo.dispensed_date,'%d-%m-%Y') AS "Data do Levantamento"
DATE_FORMAT(edo.dispensed_date,'%d-%m-%Y') AS "Data do Levantamento",
DATE_FORMAT(papp.start_date_time, '%d-%m-%Y') as "Data do Próximo Levantamento"
FROM
(SELECT @rownum:=0) as initialization,
person p
Expand Down Expand Up @@ -41,4 +42,8 @@ and edo.dispensed=1
and edo.arv_dispensed=1
AND edo.dispensed_date IS NOT NULL
AND CAST(edo.dispensed_date AS DATE) BETWEEN '#startDate#' AND '#endDate#'
LEFT JOIN
patient_appointment papp
ON papp.patient_id = p.person_id
AND papp.appointment_service_id = 5
;