Quote:
|
Originally Posted by dexon123@hotmail.
Ok I back with Lookup Lists and Surrogate Key vs. Natural Key, this time I have a complex scenario.
We have 3 dropdown lists on a screen; they represent a medical condition for instance a heart attack:
Underlying Cause
Treatment
Initial Outcome
Underlying Cause would be a list of all possible conditions that could cause the heart attack.
Treatment items would depend on Underlying Cause and would be an empty list until a selection is made in Underlying Cause which would fire off the list being populated.
Initial Outcome would also be dependent on the Treatment.
Also this screen would be installed at many different sites and each site may have different descriptions for the items in the lists although they would have the same meaning, they may even be in a different language.
So I couldn't rely on the descriptions to code the logic. I would use a surrogate key to define the logic.
When I save the record should I store the surrogate key or the description?
My thoughts are I should store the surrogate key.
I would like yours thoughts on this, particularly from the Natural Key advocates and how they would address this scenario.
Thanks
Richard
|
In healthcare systems I have worked with there are organisational and national standards that mandate standard diagnosis, treatment codes and so forth. There are also international standards for those things (ICD, SNOMED).
I'm very surprised if your organisation isn't already using such standards. If they are then they already have a suitable key - the diagnosis or treatment codes specified in the standard.