Fix problem with NPE rendering quantity

This commit is contained in:
Grahame Grieve 2020-06-14 07:08:31 +10:00
parent 779d50b61b
commit 1a4edb33a4
2 changed files with 7 additions and 1 deletions

View File

@ -655,7 +655,9 @@ public class DataRenderer {
protected void renderQuantity(XhtmlNode x, Quantity q, boolean showCodeDetails) {
if (q.hasComparator())
x.addText(q.getComparator().toCode());
x.addText(q.getValue().toString());
if (q.hasValue()) {
x.addText(q.getValue().toString());
}
if (q.hasUnit())
x.tx(" "+q.getUnit());
else if (q.hasCode())

View File

@ -96,6 +96,7 @@ public class ClientUtils {
public static final String DEFAULT_CHARSET = "UTF-8";
public static final String HEADER_LOCATION = "location";
private static boolean debugging = false;
private HttpHost proxy;
private int timeout = 5000;
@ -323,6 +324,9 @@ public class ClientUtils {
}
response = httpclient.execute(request);
} catch(IOException ioe) {
if (ClientUtils.debugging ) {
ioe.printStackTrace();
}
throw new EFhirClientException("Error sending Http Request: "+ioe.getMessage(), ioe);
}
return response;