gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] clarification of multiplicity of links


From: sjtan
Subject: Re: [Gnumed-devel] clarification of multiplicity of links
Date: Sun, 15 Aug 2004 21:21:48 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616



/ clin_narrative    has only one  lnk_code2narrative /
No. Many rows in lnk_code2narr can point to the same
clin_narrative row. But they must be fulfill
   unique(fk_narrative, code, coding_system)
eg. it doesn't make sense to attach one and the same code
from a given coding system to one particular narrative row.

unique within a clin_encounter grouping , but might repeat for another clin_narrative in a different clin_encounter?

/ vaccination  has only one lnk_vacc2vacc_def/
Yes. One vaccination can only be meant to stand for one
particular scheduled vaccination. Eventually, this table might
go away.

/ clin_root_item has only one lnk_type2item/
No. Many item types can be linked to a particular item row. But
only once per item row. It doesn't make sense to say "this
narrative is Hx" twice for the same narrative (row).

I'm not sure what "item row" is . Is the item_type only relevant to some clin_root_items e.g. clin_narrative , but not to others e.g. the other clin_root_item subtypes.

Karsten
--


Thanks for the reply: I'm trying to use this info for a programming tool for gnumed, for serialization and form skeleton generation. Richard says it won't work, but I'm still giving it a go, because it's interesting
in a woodwork-class sort of way.

The idea is to include any many-to-one links within the same form, and recurse for contained many-to-one links,
and to build a form element for one-to-many  many-ended items.
Below is the forms output currently. Where it doesn't make sense, I'd be obliged if anyone can show the snippet ( please don't say it all doesn't make sense, because Richard already has!)


The flattened attributes were:-
------------------------------
For root =  identity  the flat attribute was:
       marital_status.id
       marital_status.name
       identity.id
       identity.pupic
       identity.gender
       identity.karyotype
       identity.dob
       identity.cob
       identity.deceased
       identity.title
Other forms collected within  identity  are:-
       For collection item  lnk_identity2ext_id
       map is :
               enum_ext_id_types.pk
               enum_ext_id_types.name
               enum_ext_id_types.issuer
               enum_ext_id_types.context
               lnk_identity2ext_id.id
               lnk_identity2ext_id.external_id
               lnk_identity2ext_id.comment
       For collection item  lnk_job2person
       map is :
               occupation.id
               occupation.name
               lnk_job2person.id
               lnk_job2person.comment
       For collection item  lnk_person_org_address
       map is :
               address_type.id
               address_type.name
               country.id
               country.code
               country.name
               country.deprecated
               state.id
               state.code
               state.name
               urb.id
               urb.postcode
               urb.name
               street.id
               street.name
               street.postcode
               address.id
               address.suburb
               address.number
               address.addendum
               occupation.id
               occupation.name
               lnk_person_org_address.id
               lnk_person_org_address.address_source
       For collection item  lnk_person2relative
       map is :
               relation_types.id
               relation_types.biological
               relation_types.biol_verified
               relation_types.description
               lnk_person2relative.id
               lnk_person2relative.started
               lnk_person2relative.ended
       For collection item  names
       map is :
               names.id
               names.active
               names.lastnames
               names.firstnames
               names.preferred
       For collection item  lnk_identity2comm_chan
       map is :
               enum_comm_types.id
               enum_comm_types.description
               comm_channel.id
               comm_channel.url
               lnk_identity2comm_chan.id
               lnk_identity2comm_chan.is_confidential
       For collection item  staff
       map is :
               staff_role.pk
               staff_role.name
               staff_role.comment
               staff.pk
               staff.db_user
               staff.sign
               staff.comment
------------------------------
For root =  org  the flat attribute was:
       org_category.id
       org_category.description
       org.id
       org.description
Other forms collected within  org  are:-
       For collection item  lnk_org2ext_id
       map is :
               enum_ext_id_types.pk
               enum_ext_id_types.name
               enum_ext_id_types.issuer
               enum_ext_id_types.context
               lnk_org2ext_id.id
               lnk_org2ext_id.external_id
               lnk_org2ext_id.comment
       For collection item  lnk_person_org_address
       map is :
               address_type.id
               address_type.name
               country.id
               country.code
               country.name
               country.deprecated
               state.id
               state.code
               state.name
               urb.id
               urb.postcode
               urb.name
               street.id
               street.name
               street.postcode
               address.id
               address.suburb
               address.number
               address.addendum
               lnk_person_org_address.id
               lnk_person_org_address.address_source
       For collection item  lnk_org2comm_channel
       map is :
               enum_comm_types.id
               enum_comm_types.description
               comm_channel.id
               comm_channel.url
               lnk_org2comm_channel.id
               lnk_org2comm_channel.is_confidential
------------------------------
For root =  xlnk_identity  the flat attribute was:
       allergy_state.id
       allergy_state.has_allergy
       xlnk_identity.pk
       xlnk_identity.xfk_identity
       xlnk_identity.pupic
       xlnk_identity.data
Other forms collected within  xlnk_identity  are:-
       For collection item  test_result
       map is :
               test_type.id
               test_type.code
               test_type.coding_system
               test_type.name
               test_type.comment
               test_type.basic_unit
               test_result.pk_item
               test_result.clin_when
               test_result.fk_encounter
               test_result.fk_episode
               test_result.narrative
               test_result.soap_cat
               test_result.id
               test_result.val_num
               test_result.val_alpha
               test_result.val_unit
               test_result.val_normal_min
               test_result.val_normal_max
               test_result.val_normal_range
               test_result.technically_abnormal
               test_result.norm_ref_group
               test_result.note_provider
               test_result.material
               test_result.material_detail
               test_result.reviewed_by_clinician
               test_result.clinically_relevant
       For collection item  lnk_vacc2vacc_def
       map is :
               vacc_indication.id
               vacc_indication.description
               vacc_regime.id
               vacc_regime.name
               vacc_regime.fk_recommended_by
               vacc_regime.comment
               vacc_def.id
               vacc_def.is_booster
               vacc_def.seq_no
               vacc_def.min_age_due
               vacc_def.max_age_due
               vacc_def.min_interval
               vacc_def.comment
               lnk_vacc2vacc_def.pk
       For collection item  vaccination
       map is :
               vacc_route.id
               vacc_route.abbreviation
               vacc_route.description
               vaccine.id
               vaccine.trade_name
               vaccine.short_name
               vaccine.is_live
               vaccine.min_age
               vaccine.max_age
               vaccine.last_batch_no
               vaccine.comment
               vaccination.pk_item
               vaccination.clin_when
               vaccination.fk_encounter
               vaccination.fk_episode
               vaccination.narrative
               vaccination.soap_cat
               vaccination.id
               vaccination.fk_provider
               vaccination.site
               vaccination.batch_no
       For collection item  allergy
       map is :
               _enum_allergy_type.id
               _enum_allergy_type.value
               allergy.pk_item
               allergy.clin_when
               allergy.fk_encounter
               allergy.fk_episode
               allergy.narrative
               allergy.soap_cat
               allergy.id
               allergy.substance
               allergy.substance_code
               allergy.generics
               allergy.allergene
               allergy.atc_code
               allergy.generic_specific
               allergy.definite
       For collection item  clin_narrative
       map is :
               lnk_code2narr.pk
               lnk_code2narr.code
               lnk_code2narr.xfk_coding_system
               clin_diag.pk
               clin_diag.laterality
               clin_diag.is_chronic
               clin_diag.is_active
               clin_diag.is_definite
               clin_diag.is_significant
               clin_narrative.pk_item
               clin_narrative.clin_when
               clin_narrative.fk_encounter
               clin_narrative.fk_episode
               clin_narrative.narrative
               clin_narrative.soap_cat
               clin_narrative.pk
               clin_narrative.is_rfe
               clin_narrative.is_aoe
       For collection item  constituent
       map is :
               constituent.genericname
               constituent.amount
               constituent.amount_unit
       For collection item  curr_medication
       map is :
               curr_medication.pk_item
               curr_medication.clin_when
               curr_medication.fk_encounter
               curr_medication.fk_episode
               curr_medication.narrative
               curr_medication.soap_cat
               curr_medication.id
               curr_medication.started
               curr_medication.last_prescribed
               curr_medication.expires
               curr_medication.brandname
               curr_medication.adjuvant
               curr_medication.db_origin
               curr_medication.db_xref
               curr_medication.atc_code
               curr_medication.amount_unit
               curr_medication.dose
               curr_medication.period
               curr_medication.form
               curr_medication.directions
               curr_medication.prn
               curr_medication.sr
       For collection item  clin_aux_note
       map is :
               clin_aux_note.pk_item
               clin_aux_note.clin_when
               clin_aux_note.fk_encounter
               clin_aux_note.fk_episode
               clin_aux_note.narrative
               clin_aux_note.soap_cat
               clin_aux_note.pk
       For collection item  form_data
       map is :
               form_data.pk
               form_data.place_holder
               form_data.value
       For collection item  form_queue
       map is :
               form_target_classes.pk
               form_target_classes.name
               form_queue.pk
               form_queue.form
               form_queue.submitted_when
               form_queue.fk_submitted_by
               form_queue.submitted_from
               form_queue.status
       For collection item  form_instances
       map is :
               form_types.pk
               form_types.name
               form_defs.pk
               form_defs.name_short
               form_defs.name_long
               form_defs.revision
               form_defs.template
               form_defs.engine
               form_defs.in_use
               form_defs.electronic
               form_defs.flags
               form_instances.pk_item
               form_instances.clin_when
               form_instances.fk_encounter
               form_instances.fk_episode
               form_instances.narrative
               form_instances.soap_cat
               form_instances.pk
               form_instances.form_name
       For collection item  clin_root_item
       map is :
               clin_episode.id
               clin_episode.description
               clin_item_type.pk
               clin_item_type.type
               clin_item_type.code
               lnk_type2item.pk
               clin_root_item.pk_item
               clin_root_item.clin_when
               clin_root_item.narrative
               clin_root_item.soap_cat
       For collection item  clin_encounter
       map is :
               encounter_type.pk
               encounter_type.description
               clin_encounter.id
               clin_encounter.fk_location
               clin_encounter.fk_provider
               clin_encounter.description
               clin_encounter.started
               clin_encounter.last_affirmed
       For collection item  clin_episode
       map is :
               clin_episode.id
               clin_episode.description
       For collection item  clin_health_issue
       map is :
               clin_health_issue.id
               clin_health_issue.description
       For collection item  doc_desc
       map is :
               doc_desc.id
               doc_desc.text
       For collection item  doc_obj
       map is :
               doc_obj.id
               doc_obj.seq_idx
               doc_obj.comment
               doc_obj.data
       For collection item  doc_med
       map is :
               doc_type.id
               doc_type.name
               doc_med.id
               doc_med.comment
               doc_med.date
               doc_med.ext_ref
       For collection item  lnk_result2lab_req
       map is :
               lnk_result2lab_req.pk
       For collection item  lab_request
       map is :
               test_org.pk
               test_org.fk_org
               test_org.internal_name
               test_org.comment
               lab_request.pk_item
               lab_request.clin_when
               lab_request.fk_encounter
               lab_request.fk_episode
               lab_request.narrative
               lab_request.soap_cat
               lab_request.pk
               lab_request.request_id
               lab_request.lab_request_id
               lab_request.lab_rxd_when
               lab_request.results_reported_when
               lab_request.request_status
               lab_request.is_pending
       For collection item  referral
       map is :
               referral.pk_item
               referral.clin_when
               referral.fk_encounter
               referral.fk_episode
               referral.narrative
               referral.soap_cat
               referral.id





reply via email to

[Prev in Thread] Current Thread [Next in Thread]