We’ve had some remarkable entries for our Enterprise Article competition. It never ceases to amaze me how many different industries and places in our lives that RAD Studio with Delphi and C++ Builder are just quietly doing magnificent things. Today’s enterprise article from Anouar Hamza Cherif is about his experience with cross platform development to create a multiplatform app for dentistry professionals and researchers so that they can easily create periodontal charts, essential to the visualization and recording of the condition of your teeth and for tracking any treatment.
Ok, now relax, this won’t hurt a bit.. 😁
Table of Contents
What is periodontal charting?
Periodontal charting in dentistry, and precisely in periodontics practice and research fields, is an important process for assessing and monitoring gingival and periodontal health or disease. After the periodontal probing for measuring various gingival parameters on each tooth such as lesion depth, tissue loss and so on, the recorded numerical values are interpreted in order to define the disease classification, and then to draw a periodontal chart. (Wolf and al., 2005)
What makes a good app for periodontal charting?
Having an app, either on desktop or mobile, for periodontal charting will facilitate the researcher tasks like data collection in practice on the fly when working on the patient, patient records organization and analysis.
In this subject, an ideal app, or at least the concept our team was looking for must be:
- Designed as an intuitive user interface with easy to use commands.
- Working on multiple platforms (desktop and mobile devices)
- Save and load exams records (periodontal probing values).
- Draw and export periodontal charts as high quality images.
- Organizing patient exams like in an electronic health records software.
Saving periodontal probing values and drawing their corresponding charts for visualization on every exam has been an exhausting task, because it was done manually, as there is no quick app for making this task easy. The only available solutions are paid services with monthly fees that offer to host your records and to draw a periodontal chart. And there is also a website that only draws the chart on the fly according to the input values without any saving or hosting features.
So at this point, it came my task in developing a multiplatform app (desktop and mobile) by using Delphi in order to facilitate the creation of periodontal charts.
Why Delphi?
Object Pascal is a learning-friendly language with easy paradigms that I have used since 2011. And Delphi IDE has many features and advantages that encourage you to use it, the most notable are :
- Multi-platforms targeting from a single code base and even a single form design.
- Rapid code navigation between interface and implementation sections and quick units finding.
- DataModule for separating data layer components and codes in one common container shared between the application forms.
- Easy to use built-in graphics framework.
For these reasons, Delphi was the obvious choice for developing this project.
What are the features of the periodontal charting app?
At the time of writing this article, our periodontal charting app runs on Windows and Android (thanks to Delphi FMX framework), and it can be used for working either locally on one device or in a network connecting many users. Indeed, data processing and charting codes are totally contained in this client app, while the network server is a PHP application that connects to a MySQL database for storing users data and patients records.
The client app is capable of :
- Authenticating users (the dentists working in this research project) in case of using the app in a network.
- Saving input values to a file or directly to the server’s database.
- Loading saved values from an existing file (created either on the same device or on any other device) or from the server’s database.
- Marking the tooth status (natural, extracted or implanted tooth).
- Marking additional parameters about every tooth (tooth mobility, furcation and inter-radicular lesions) and every probing site (tissue loss or elevating, gum bleeding, tooth mobility, bacterial plaque, …).
- Calculating the input values to draw the periodontal chart.
- Exporting the drawn chart as pictures files.
- Side-by-side comparison of different exams of the same patient for assessing the disease evolution.
- Organizing patient historical exams in a library, with many filtering options (for the case of using the app locally without network).
- Synchronizing records between the user devices (in both modes of using: local and network).
- Resizing UI to fit both landscape and portrait screens.
What will the result of the periodontal charting look like?
The result of the periodontal probing data will be the picture shown in the app screenshot below.
What components were used for the development?
Along with the Delphi FMX framework, our project used :
- FireDAC for storing and working with input values as a dataset (
TFDMemTable
), and for saving/loading records in FireDAC JSON storage format. - FMX Objects and Graphics components for drawing paths on blank templates for periodontal charts.
- FMX Platform Services for implementing a multi-platforms experience: screen orientation, dialogs, clipboard, virtual keyboard, etc.
- Skia4Delphi : as the most recent and recommended graphical backend for Delphi apps, it was used to get a high quality user interface with high performance rendering.
- Ethea IconFontsImageList : for a modern and stunning UI, this component is a must. It implements a custom ImageList component that uses font’s logos and icons, with more options for specifying color and size for every icon.
- DzHTMLText : An FMX component developed by Digao Dalpiaz for showing a formatted text on a label by using an almost identical HTML syntax.
- REST Client Library for exchanging data with the server when using the app in a network : authenticating users, downloading and updating data in the server, and loading patient records from the server, synchronizing records between the user devices, etc.
What does the data represent?
A periodontal chart represents the current state of the periodontal health for every tooth, the extent of the periodontal disease and the locations of the most infected zones in a patient’s mouth, according to the values gathered by the dentist when performing the probing exam.
How does the code work?
The blanks – the periodontal charting templates – are compiled inside the app binary, each probing site is marked by its pixel coordinates as reference for creating the charts, which are TPath
objects.
The periodontal probing values found by the dentist are entered in the app as a new exam record. Then, the app logic will compute those values into probing coordinates that will be combined with the blank reference coordinates in order to write the pathdata
strings used for creating various TPathData
objects, for upper and lower mouth, in both buccal and lingual faces, according to specific parameters such as probing depth, tissue loss and so on.
These TPathData
objects will be drawn on the blank template through drawing sessions on its canvas object (by using the TCanvas.FillPath
function for drawing filled areas and the TCanvas.DrawPath
function for drawing open lines).
At the end, the final updated bitmap (which is the resulting periodontal chart) is shown to the user who will have the ability to export it to an image file.
Finally, the dentist will validate its exam by saving the probing values as a record into an external file or to the server database.
What are your future enterprise app plans for RAD Studio with Delphi?
In the near future, we are planning to continue developing this project with more features. And also looking for new horizons such as integrating this app with other EHR and dental practice management software, enhancing the server abilities in order to widen the research network by recruiting more dentists and reaching other institutions.
Bibliography
Wolf HF, Rateitschak EM, Rateitschak KH, Hassell TM. Color Atlas of Dental Medicine: Periodontology, 2005. Thieme.
This article was submitted as part of our Enterprise Article Showcase. If you have a success story to tell about a project which makes use of RAD Studio with Delphi or C++ Builder, or any of our other great enterprise products please get in touch, you could be featured too and win a prize! Read all about it here: Enterprise Article Showcase
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition