March 10, 2011 at 2:24 pm #31199clinicoffice_userParticipant
I am trying to generate a report, to find out the number of Diabetic patients we have in our foot clinic.
Currently we have a field in our patient details indicating medical card number.
In this field we either enter diabetic, private or an actual medical card number.
Can you help me on this one?
Richard OrrMarch 10, 2011 at 3:11 pm #32713WilliamKeymaster
Thanks for the post. This sounds like you need custom fields to be displayed in the patient grid in order perform a search on the diabetic patients. To display custom fields on the patient grid please follow the steps below:
 Go to the Patient grid in ClinicOffice
 Click the Grid Options button
 Click the Edit link (this is at the top of the Grid Options panel)
 Under Grid Sources right click on a blank area and select New
 Enter a name like Custom Fields and click OK
 Please copy and paste the code from below into the SQL Source field
select per.id, per.code, per.lastname, per.firstname, per.title, per.middlename, per.knownas,
per.company, per.address1, per.address2, per.address3, per.towncity, per.county, per.postcode, per.country,
per.telephone, per.worktel, per.mobile, per.fax, per.email, per.dob, per.registrationdate,
(coalesce(clinic.prefix, '') || cast(per.code as varchar(20))) as _patientcode,
per.clinic_id, clinic.name as _clinic,
per.patcat_id, patcat.name as _patient_category,
per.patstatus_id, patstatus.name as _patient_status,
per.practitioner_staff_id, staff.knownas as _practitioner,
left join clinic on (per.clinic_id=clinic.id)
left join patcat on (per.patcat_id=patcat.id)
left join patstatus on (per.patstatus_id=patstatus.id)
left join staff on (per.practitioner_staff_id=staff.id)
left join custom_patient_fields on (custom_patient_fields.per_id=per.id)
where (per.ispatient=true and per.deleted=false)
 Click the Save button and then the Close button
You will now be able to see the custom patient fields. This will enable you to then search for diabetic patients and the grid will then show you the total number of diabetic patients.
Hope this information helps.September 18, 2018 at 10:54 pm #36826meli524Participant
Thank you for having all this info available on the forum!! This helped me 7 years after it was posted 😀
- You must be logged in to reply to this topic.