开发者

Implement a database requirement

I am programming a database. I have one requirement, I am unsure how to implement it.The database is about medical related information. It is as follows:

  1. Ventricular Arrangement: This begins as a single entry box that becomes 7 separate fields to describe the ventricles:

    a. Number of Ventricles (Vent_No): 2 choices = 1 or 2.

    i. If choice is 1 then this field needs to be filled: 1. Ventricular Morphology (UniVent_Morph): 3 choices = Right, Left, Indeterminate (for >>this field, we may have to have a popup box that explains that this does not apply to >>situations where there is a 'hypoplatic' ventricle. Examples of this situation include >>unbalanced AVSD, HLHS, PAA with IVS, etc. These hearts would be coded using the 2 >>ventricle drop down list). ii. If choice is 2 then this drop-down occurs with 4 fields to fill:

    1. Right Sided Ventricular Morphology (RitS_Vent_Morph): 3 choices = Right, Left, >>>Indeterminate.
    2. Right Sided Ventricular Size (RitS_Vent_Size): 3 choices = Normal, Hypoplastic, >>>Enlarged.
    3. Left Sided Ventricular Morphology (LftS_Vent_Morph): 3 choices = Right, Left, Indetermi开发者_如何学JAVAnate.
    4. Left Sided Ventricular Size (LftS_Vent_Size): 3 choices = Normal, Hypoplastic, >>>Enlarged.

    b. For the complex ventricular malformations, we need to have a ‘memo’ field pop up for description (this may be in a separate table linked by the SpcUI field).


I would probably do something like this:

Ventricles
PatientId int (not null)
VentricularMorphologyTypeid (int not null) 
VentricularMorphologyid (int not null)
VentricularSizeID (int null)
Notes (nvarchar(max) null)

Then I would create three lookup tables for the potential values for the typeId (1 or 2 and descriptons as to what 1 and 2 are (UniVent_Morph and ?) and for the Morphology Id (Right Left and indeterminate) and for the Ventricular size ( Normal, Hypoplastic, Enlarged). I would create foreign key constraints to the lookup tables and the patient table so that only those values can be recorded.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜