fix for #575 NPE in rendering Patient
This commit is contained in:
parent
fb0d90ad1f
commit
4ba9193a5e
|
@ -72,7 +72,7 @@ public class MedicationRequest10_40 {
|
|||
if (src.hasDose())
|
||||
dose_and_rate.setDose(ConversionContext10_40.INSTANCE.getVersionConvertor_10_40().convertType(src.getDose()));
|
||||
if (src.hasRate())
|
||||
dose_and_rate.setDose(ConversionContext10_40.INSTANCE.getVersionConvertor_10_40().convertType(src.getRate()));
|
||||
dose_and_rate.setRate(ConversionContext10_40.INSTANCE.getVersionConvertor_10_40().convertType(src.getRate()));
|
||||
tgt.addDoseAndRate(dose_and_rate);
|
||||
if (src.hasMaxDosePerPeriod())
|
||||
tgt.setMaxDosePerPeriod(Ratio10_40.convertRatio(src.getMaxDosePerPeriod()));
|
||||
|
|
|
@ -195,9 +195,13 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
public void describe(XhtmlNode x, HumanName name, String gender, DateType dob, Identifier id) throws UnsupportedEncodingException, IOException {
|
||||
render(x.b(), name);
|
||||
if (name == null) {
|
||||
x.b().tx("Unnamed Patient"); // todo: is this appropriate?
|
||||
} else {
|
||||
render(x.b(), name);
|
||||
}
|
||||
x.tx(" ");
|
||||
if (dob == null) {
|
||||
if (gender == null) {
|
||||
x.tx("??");
|
||||
} else {
|
||||
x.tx(gender);
|
||||
|
|
Loading…
Reference in New Issue