Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mdht-dev] xsi:type problem in observationMedia/value

Dear MDHT team,

I face a minor problem with the value element in the observationMedia
class. For specific reasons I have the requirement
that the xsi:type="ED" element is present in the XML representation of
the element. My code looks like this:

ObservationMedia om = CDAFactory.eINSTANCE.createObservationMedia();

ED value = DatatypesFactory.eINSTANCE.createED();
value.setMediaType(mimeType.getCodeValue());
value.setRepresentation(BinaryDataEncoding.B64);
value.addText("B64Foo");
om.setValue(value);

I am trying to accomplish:

<observationMedia classCode="OBS" moodCode="EVN">
    <value xsi:type="ED" representation="B64" mediaType="image/jpeg">B64Foo
</value>
</observationMedia>


What I get is (missing xsi:type="ED"):

<observationMedia classCode="OBS" moodCode="EVN">
    <value representation="B64" mediaType="image/jpeg">B64Foo
</value>
</observationMedia>


It seems that the CDA schema permits omitting the xsi:type, but in my
case it´s required. Is there a way to bring it back?

Thanks!

-- 

Dr.-Ing. Axel Helmer
eHealth Services
Training, Consulting, Software Development

Baurat-Gerber-Str. 18
D-37073 Göttingen, Germany
Phone: +49 179 478 3239
E-Mail: axel.helmer.job@xxxxxxxxx


Back to the top