0

i'm developing a medical application, the user needs to register (among other things) the patient clinical hystory and ophthalmological measurements.

Clinical history is composed by patient's history and by its family history. Both of them can cointain general pathologies (ex diabetes) and specialized pathologies (ex glaucoma). I'm been asked to classify pathologies in two ways : if its a specilized pathology it must define the anatomic part of the eye it is related; if it's a general pathology it needs to defines a description of the patology. Finally i've to distinguish if a an ophthalmological measurement refers to right or left eye.

For now i've made the following decisions, but i'm not sure about them and i'd like to have someone else opinion :

Clinical history is a table with a fk to the patient and containing a date column "last update date" Pathologies are grouped into a single table with a numeric pk column,a name column, a description and a flag yes/no which specifies if it's a specialized or general pathology Clinical history and patologies are binded by a table with a primary key composed by a fk on clinical history and a fk to patologies table, and a flag yes/no which defines if it's a patient pathology or a family pathology.

Opthalmological measurements are related to an examination table and can contain 0-2 records per examination (left, right or none eye examined), the eye is identified again with a flag. its pk is composend by a fk on examination table and the flag. Finally , since measurement always store the same value types (float) and a common set(type) of measurements depending on the instrument used (axis, cylinder, ...), i've added a n:m (where n is o-2) table whith a pk composed by Opthalmological measurements pk and instrument type

I feel unconfortable with flags from which i have to extrapolate and group data, on the other hand i haven't found anything better than duplicate tables to reflect the description i'm been given (ex two pathology table which differs only for the name of a column : "anatomic part" or decription)

i'd like have some comments,opinion and suggestions about any flaw in this design and any improvement to it

thank you in advance

2 Answers 2

2

What medical systems standards, classification schemes and metadata models are you working to? I assume you are aware that there is a range of national and international standards for this kind of thing: e.g. SNOMED, ICD, HL7, HIPAA. If you start by conforming to classification schemes, codes and metadata defined in the standards then that ought to be a good basis for beginning your data model.

0

This is a fairly common issue - it's sorta kinda related to the "how do I model the object oriented concept of inheritance in my database?" question, with Craig Larman's book "Applying UML and Patterns" treats really well.

You have options - there's nothing inherently wrong with modeling your business domain in specific tables whose names reflect the business domain. Especially for long-lived applications, being as clear as possible is going to reduce bugs and craziness down the line.

If I've understood your questions properly, "specialized pathologies" have different attributes to "general pathologies" - I would definitely model them as two separate tables.

For your "examinations" table, I'd consider something like:

Table: examinations
ExaminationID
LeftEyeExaminationID - FK to EyeExaminations table
RightEyeExaminationID - FK to EyeExaminations table

Table: eye_examinations
EyeExaminationID
Value 

As for flags - true, nasty, error prone. Most databases allow you to define a "type", which at least abstracts the flag into something more intelligible, much like constants do in C-like languages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.