Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #31199


    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 Orr


    Hi Richard

    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:

    [1] Go to the Patient grid in ClinicOffice
    [2] Click the Grid Options button
    [3] Click the Edit link (this is at the top of the Grid Options panel)
    [4] Under Grid Sources right click on a blank area and select New
    [5] Enter a name like Custom Fields and click OK
    [6] Please copy and paste the code from below into the SQL Source field

    select, per.code, per.lastname, per.firstname, per.title, per.middlename, per.knownas,, per.address1, per.address2, per.address3, per.towncity, per.county, per.postcode,,
    per.telephone, per.worktel,, per.fax,, per.dob, per.registrationdate,

    (coalesce(clinic.prefix, '') || cast(per.code as varchar(20))) as _patientcode,
    per.clinic_id, as _clinic,
    per.patcat_id, as _patient_category,
    per.patstatus_id, as _patient_status,
    per.practitioner_staff_id, staff.knownas as _practitioner,


    from per

    left join clinic on (
    left join patcat on (
    left join patstatus on (
    left join staff on (
    left join custom_patient_fields on (

    where (per.ispatient=true and per.deleted=false)

    [7] 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.


    Thank you for having all this info available on the forum!! This helped me 7 years after it was posted 😀

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.