fixed bug in conversion from dstu2 to r4 in timing resource

This commit is contained in:
Itay Goren 2020-10-06 19:07:57 +03:00
parent f56235d596
commit a8b715af97
2 changed files with 13 additions and 9 deletions

View File

@ -2023,15 +2023,18 @@ public class VersionConvertor_10_40 {
copyElement(src, tgt);
if (src.hasBounds())
tgt.setBounds(convertType(src.getBounds()));
tgt.setCount(src.getCount());
if (src.hasCount())
tgt.setCount(src.getCount());
if (src.hasDurationElement())
tgt.setDurationElement(convertDecimal(src.getDurationElement()));
if (src.hasDurationMaxElement())
tgt.setDurationMaxElement(convertDecimal(src.getDurationMaxElement()));
if (src.hasDurationUnits())
tgt.setDurationUnitElement(convertUnitsOfTime(src.getDurationUnitsElement()));
tgt.setFrequency(src.getFrequency());
tgt.setFrequencyMax(src.getFrequencyMax());
if (src.hasFrequency())
tgt.setFrequency(src.getFrequency());
if (src.hasFrequencyMax())
tgt.setFrequencyMax(src.getFrequencyMax());
if (src.hasPeriodElement())
tgt.setPeriodElement(convertDecimal(src.getPeriodElement()));
if (src.hasPeriodMaxElement())
@ -2051,15 +2054,18 @@ public class VersionConvertor_10_40 {
copyElement(src, tgt);
if (src.hasBounds())
tgt.setBounds(convertType(src.getBounds()));
tgt.setCount(src.getCount());
if (src.hasCount())
tgt.setCount(src.getCount());
if (src.hasDurationElement())
tgt.setDurationElement(convertDecimal(src.getDurationElement()));
if (src.hasDurationMaxElement())
tgt.setDurationMaxElement(convertDecimal(src.getDurationMaxElement()));
if (src.hasDurationUnit())
tgt.setDurationUnitsElement(convertUnitsOfTime(src.getDurationUnitElement()));
tgt.setFrequency(src.getFrequency());
tgt.setFrequencyMax(src.getFrequencyMax());
if (src.hasFrequency())
tgt.setFrequency(src.getFrequency());
if (src.hasFrequencyMax())
tgt.setFrequencyMax(src.getFrequencyMax());
if (src.hasPeriodElement())
tgt.setPeriodElement(convertDecimal(src.getPeriodElement()));
if (src.hasPeriodMaxElement())
@ -3430,4 +3436,4 @@ public class VersionConvertor_10_40 {
copyElement(src, tgt);
return tgt;
}
}
}

View File

@ -18,9 +18,7 @@
"dosageInstruction": [{"text": "Take 10 mg by mouth nightly.",
"timing": {"repeat": {"boundsPeriod": {"start": "2016-11-15T00:00:00Z",
"end": "2016-11-23T00:00:00Z"},
"count": 0,
"frequency": 1,
"frequencyMax": 0,
"period": 1.0,
"periodUnit": "d"}},
"asNeededBoolean": "False",