forked from Bahmni/default-config
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reports additional tabs for customize reports
- Loading branch information
1 parent
51468a6
commit 0abdd35
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"appointmentReport": { | ||
"name": "Missed Appointment Report", | ||
"type": "MRSGeneric", | ||
"config": { | ||
"sqlPath": "/var/www/bahmni_config/openmrs/apps/reports/sql/missedAppointments.sql" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
SELECT | ||
pai.identifier AS 'patient ID', | ||
pn.given_name AS 'First Name', | ||
ifnull(pn.family_name,'') AS 'Last Name', | ||
paMobile.value AS 'Telephone No.', | ||
p.gender AS 'Gender', | ||
DATE_FORMAT(start_date_time, "%d/%m/%Y") AS 'Appointment Date' | ||
FROM patient_appointment pa | ||
LEFT JOIN person p ON p.person_id = pa.patient_id AND pa.voided IS FALSE | ||
LEFT JOIN person_name pn ON p.person_id = pn.person_id AND pn.voided IS FALSE | ||
LEFT JOIN patient_identifier pai on (pai.patient_id = pa.patient_id and pai.preferred = 1) | ||
LEFT JOIN person_attribute_type patMobile on patMobile.name = "MobileNumber" and patMobile.retired IS FALSE | ||
LEFT JOIN person_attribute paMobile on (pa.patient_id = paMobile.person_id and paMobile.voided is false and patMobile.person_attribute_type_id = paMobile.person_attribute_type_id) | ||
WHERE pa.status = 'Missed' OR start_date_time < CURDATE() ORDER BY start_date_time DESC; |