XML Projection Question

10 views
Skip to first unread message

Marc Lang

unread,
May 15, 2012, 5:11:14 AM5/15/12
to InterSystems: Ensemble in Healthcare
Hi,

I have a complex class:


Property ReportIdentifier As GGC.Schemas.gen29.IDVALUETYPE(XMLNAME = "ReportIdentifier") [ Required ];

/// Date of report
Property ReportDate As %Date(XMLNAME = "ReportDate") [ Required ];

/// Time of report
Property ReportTime As %Time(XMLNAME = "ReportTime");

Property Discipline As GGC.Schemas.sci60.ReportDiagnosticService(XMLNAME = "Discipline") [ Required ];

Property SectionName As GGC.Schemas.sci60.ReportDiagnosticService(XMLNAME = "SectionName");

Property ServiceProvider As GGC.Schemas.sci60.ServiceProvider(XMLNAME = "ServiceProvider") [ Required ];

/// The Health Care Professional who orders a service Ref : Pathology Messaging Enabler Project V1.00 (implied)
Property RequestingParty As GGC.Schemas.gen29.HCPDETAILTYPE(XMLNAME = "RequestingParty") [ Required ];


Quite often the "ServiceProvider" is nothing - there are no values against the object.
When projected to XML, I want a node like this

<ReportIdentifier>M,12.5000453.E</ReportIdentifier>

<ReportDate>2012-05-14</ReportDate>

<ReportTime>12:00:00.0000000+01:00</ReportTime>

<Discipline>Microbiology</Discipline>

<ServiceProvider />

<RequestingParty>

     <HcpId xmlns="http://www.show.scot.nhs.uk/isd/General">

          <IdValue>4176789</IdValue>

          <IdScheme>Requestor</IdScheme>

          <IdType>Consultant</IdType>

    </HcpId>


The node needs to be there, but empty. Currently, it's not appearing at all in the XML.

How can I ensure the node is always present?
I tried XMLIGNORENULL but I think that's just for strings?

Rodolfo Mendes

unread,
May 16, 2012, 2:40:51 PM5/16/12
to ensemble-in...@googlegroups.com
Hi Marc,

Which version of Caché/Ensemble are you using?
Depending on the version, there is an XMLNIL parameter you can use.

Regards,

Rodolfo Mendes

--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en

Reply all
Reply to author
Forward
0 new messages