Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdht-dev] Comments on properties on inner classes

We found a case recently where the Documentation field is no longer printed - I think that's what you've found here.

On 12/11/15 07:24, sean.muir@xxxxxxxxxxxxxxx wrote:
 There might be an issue with comments on properties of inner classes;  

here is the code snippet from org.openhealthtools.mdht.uml.cda.core.util.CDAModelUtil.appendPropertyList(Element, Property, boolean, String[], StringBuilder, String, String[], Map<String, List<Constraint>>, List<Constraint>, Map<Constraint, List<Constraint>>)

line 1223

 boolean order = ccm.trim().endsWith(ol[1]);
boolean currentlyItem = false;
if (order) {
int olIndex = ccm.lastIndexOf(ol[1]);
ccm = ccm.substring(0, olIndex);
currentlyItem = ccm.trim().endsWith(li[1]);
}
sb.append(li[0] + prefix + ccm);
StringBuilder propertyComments = new StringBuilder();
currentlyItem &= appendPropertyComments(propertyComments, property, markup);
if (currentlyItem) {
sb.append(li[0]).append(propertyComments).append(li[1]);
}

Does anyone remember the reason we have this limitation on comments (versus just adding them) 
 
In the case that is not adding - ccm is equal to

<b>SHALL</b> contain zero or one [0..1] <tt><b>@nullFlavor</b></tt>

changing the if statement to 

if (currentlyItem) {
sb.append(li[0]).append(propertyComments).append(li[1]);
else {
sb.append(propertyComments);
}

works on my small example

i end up with 

<li>This subject <b>SHALL</b> contain zero or one [0..1] <tt><b>@nullFlavor</b></tt><p><lines><i>3333333333</i></lines></p></li>

Thanks

Sean

--

Vadim Peretokin
Clinical Information Modeller
nehta - National E-Health Transition Authority
NEHTA Brisbane Office
Level 31, 400 George St, 4000

Phone: (0) 3023 8573
Email: vadim.peretokin@xxxxxxxxxxxx
Web: www.nehta.gov.au



The information contained in this e-mail message and any accompanying files is or may be privileged or confidential. If you are not the intended recipient, any use, dissemination, reliance, forwarding, printing or copying of this e-mail or any attached files is unauthorised. This e-mail and any attachments may be subject to copyright. Copyright material should not be reproduced, adapted or communicated without the written consent of the copyright owner. If you have received this e-mail in error please advise the sender immediately by return e-mail or telephone and delete all copies. NEHTA does not make any representations or give any guarantees in respect of the accuracy or completeness of any information contained in this e-mail or attached files. Internet communications are not secure, therefore NEHTA does not accept any liability for the contents of this message or attached files.

Back to the top