medication_detail

Details about a medication or component of a medication, including strength, form and details of any specific constituents.

Details about a medication or component of a medication, including strength, form and details of any specific constituents.

Purpose. To record details about a medication or component of a medication, including strength, form and details of any specific constituents.

Source

ModelLegRole
openEHR-EHR-CLUSTER.medication.v2openEHRdefines this table

Columns

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
name
name_code
name_system
name_valueset_id
coded text
text, text, text, text
yesName/items[at0132]
form
form_code
form_system
form_valueset_id
coded text
text, text, text, text
yesForm/items[at0071]
category
category_code
category_system
category_valueset_id
coded text
text, text, text, text
yesCategory/items[at0142]
strength_presentation_strength_numerator_magnitude
strength_presentation_strength_numerator_units
quantity
numeric, text
yesStrength numerator/items[at0152]/items[at0153]
strength_presentation_strength_denominator_magnitude
strength_presentation_strength_denominator_units
quantity
numeric, text
yesStrength denominator/items[at0152]/items[at0157]
strength_concentration_magnitude
strength_concentration_units
quantity
numeric, text
yesStrength (concentration)/items[at0115]
manufacturertextyesManufacturer/items[at0151]
batch_id_value
batch_id_system
text, text
text, text
yesBatch ID/items[at0150]
expirytimestamptzyesExpiry/items[at0003]
amount_magnitude
amount_units
quantity
numeric, text
yesAmount/items[at0139]
alternate_amount_magnitude
alternate_amount_units
quantity
numeric, text
yesAlternate amount/items[at0148]
role
role_code
role_system
role_valueset_id
coded text
text, text, text, text
yesRole/items[at0127]
descriptiontextyesDescription/items[at0133]

Constraints

check ((name_code is null and name_system is null and name_valueset_id is null) or (name is not null and name_code is not null and name_system is not null and name_valueset_id is not null))
check ((form_code is null and form_system is null and form_valueset_id is null) or (form is not null and form_code is not null and form_system is not null and form_valueset_id is not null))
check ((category_code is null and category_system is null and category_valueset_id is null) or (category is not null and category_code is not null and category_system is not null and category_valueset_id is not null))
check ((strength_presentation_strength_numerator_magnitude is null and strength_presentation_strength_numerator_units is null) or (strength_presentation_strength_numerator_magnitude is not null and strength_presentation_strength_numerator_units is not null))
check ((strength_presentation_strength_denominator_magnitude is null and strength_presentation_strength_denominator_units is null) or (strength_presentation_strength_denominator_magnitude is not null and strength_presentation_strength_denominator_units is not null))
check ((strength_concentration_magnitude is null and strength_concentration_units is null) or (strength_concentration_magnitude is not null and strength_concentration_units is not null))
check (batch_id_system is null or batch_id_value is not null)
check ((amount_magnitude is null and amount_units is null) or (amount_magnitude is not null and amount_units is not null))
check ((alternate_amount_magnitude is null and alternate_amount_units is null) or (alternate_amount_magnitude is not null and alternate_amount_units is not null))
check ((role_code is null and role_system is null and role_valueset_id is null) or (role is not null and role_code is not null and role_system is not null and role_valueset_id is not null))

References

ColumnsTargetOn delete
name_valueset_id, name_code, name_system, namevalueset_coderestrict
form_valueset_id, form_code, form_system, formvalueset_coderestrict
category_valueset_id, category_code, category_system, categoryvalueset_coderestrict
role_valueset_id, role_code, role_system, rolevalueset_coderestrict

Referenced by

Child tables

1 table hang off medication_detail, one row per repetition.

medication_detail_constituent

Child table — one row per repetition, deleted with its parent.

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
medication_detail_iduuidmedication_detailno
positionintegernoOrder of this row within its parent, from zero.
constituent_iduuidnoConstituent/items[at0138]

Unique

References

ColumnsTargetOn delete
medication_detail_idmedication_detailcascade
constituent_idmedication_detailno action

Indexes

Value sets

Value setCodes
org.openehr::openEHR-EHR-CLUSTER.medication.v2/category5
org.openehr::openEHR-EHR-CLUSTER.medication.v2/role3