Should DV_MULTIMEDIA.data be a mandatory field? + simplifications
Raise
Analysis
Raise
Analysis
Description
Activity
Show:

Pablo Pazos March 9, 2018 at 3:39 PM
One last question, the only mandatory field of DV_MULTIMEDIA is media_type. So for external media only the DV_URI uri and the media_type are set.
Is the media_type really needed when having an external reference?
Why not use just DV_URI for external references?
Thomas Beale August 16, 2016 at 9:35 AM
See http://www.openehr.org/releases/RM/latest/docs/data_types/data_types.html#_dv_multimedia_class
There is an invariant
Not_empty: is_inline or is_external
I think this says what you want.
Bjørn Næss August 16, 2016 at 9:23 AM
You may store DV_MULTIMEDIA with only a reference to the real data. Then the data is NULL. This makes sense for us in the current implementation.
I agree that this is a XOR situation; you will either have data or uri. I am not sure if this is good, average or bad practice.
Won't Do
Details
Details
Reporter

Labels
Components
Affects versions
Priority
Reason For Rejection
Discussed at SEC meeting 30 Sep 2019 Valencia:
- current class is correct (invariant may not have been visible when PR raised)
Created August 14, 2016 at 6:04 PM
Updated September 30, 2019 at 2:58 PM
Resolved September 30, 2019 at 2:58 PM
Right now it has 0..1 occurrence and I think because of the semantics of datatype, data should be 1..1: there is no sense in creating a multimedia type without data IMHO.
There is the uri field also, so I thing data and uri are alternatives but one of them should be present. There is no invariant about this in the model.
Also I would suggest to have two types of DV_MULTIMEDIA, internal and external, instead of using the same class for these two purposes (needs extra methods, needs extra XOR invariants, etc.)