Hospital Management System

Hello.

Currently i am working on hospital management system, i have the following structure:

  • Patient
    ----- Visits
    ----------> Clinics
    ----------> Operations
    ----------> Radiology & Lab test
    ----------> medications

I made two [pages] one for (patient) with some <blocks> & details
The other for (Visits) with some details plus four <blocks> represented as “tabs” for :

  • Clinics
  • Operations
  • Radiology & Lab test
  • medications
    every form will be loaded in a <block> as “Master Detail”.

Ok my questions now:
1\ I want to print a payment receipt for every master detail “separately”, how could i do that?
2\ How to make an invoice that collect details from the four blocks i mentioned to provide the total payment for a patient visit?
By the way every form based on database table, so the invoice will collect information form different tables in the DB

Appreciate your help.
Thanks

It will probabely too complex for the default pdf module. What you can try is to create the output in html form and then use html2pdf to obtain the pdf.

Thank you so much “Albert”
I tried to make them in one DB table with option to select category from another table. problem now i want to make a report for example for operations or for Clinics. what is the best way to do that?

If you have a pulldown you can set an ajax onchange event on that and execute the php script to generate the report. Other option is to add buttons to the form and apply the code on the button. Or combine these methods. It depends on your application needs actually. Hard to tell with so less info.

simply made querys in the database, and then bind the pdf reports on these querys.

every query can join and resume information from several tables, and is the best solution for complex grids and reports

in your case you can select information from clinics, then UNION select information from Operations, then UNION select from Radilogy, then UNION select information from medications
all where visit = $visit_desired

remember use the “as” sintax because all field names can not be similars in all the union tables.

all this complex select saved on a Query, Ej, cs_invoice_visit then made an scriptcase Pdfreport application binded to this query

Aquiles

Thank you so much Albert.

“aquiles” i really do not know how to say thanks. this is exactly what i need and for sure this will fix the problem even before i test it :smiley:
APPRECIATE YOUR HELP

SQL UNION Syntax:

SELECT column_name(s) FROM table1
UNION
SELECT column_name(s) FROM table2;


SQL UNION [[[ALL]]] Syntax:

SELECT column_name(s) FROM table1
UNION ALL
SELECT column_name(s) FROM table2;