How to make medical resumes of files from a Java application

I created a Java program that is used to collect medical data (personal, diagnosis, treatment) in people with cancer. In this program, you fill out forms, and all this data is then stored in a database.

Now, what I want to do: if the user selects the patient data, I want to give him the opportunity to print the patient record. I know how to print a file using java. But I do not know how to create such a file, how to create it. I mean, this is not just a print of "Hello world". Tables, colors, etc. may be required. How should I do it? Is there a way to make a prototype file (for example, doc) and then fill in only the data through the program, or do I need to completely form this file through my program?

Hope I have been clearly understood!

+3
source share
3 answers

Use a reporting mechanism such as JasperReports or Birt .

It is quite simple to integrate and provide quick and easy creation of documents ready for printing, and, as a rule, other formats (for example, excel).

+2
source

Take a look at JasperReports , which provides the necessary functions for creating dynamic reports, including data retrieval using JDBC (Java Database Connectivity). It will take you some time to study it though.

+1
source
+1
source

Source: https://habr.com/ru/post/1765906/


All Articles