Skip to content

Commit

Permalink
improved code generation for profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Grahame Grieve committed Dec 2, 2024
1 parent 8cf8e0d commit ce3ff06
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions r5/profiles/TestProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,14 @@ public void load(PEInstance src) {
code = (CodeableConcept) src.child("code").asDataType();
}
if (src.hasChild("subject")) {
subject = (Reference) src.child("subject").asDataType();
Reference ref = (Reference) src.child("subject").asDataType();
if(!ref.isEmpty())
subject = ref;
}
if (src.hasChild("encounter")) {
encounter = (Reference) src.child("encounter").asDataType();
Reference ref = (Reference) src.child("encounter").asDataType();
if(!ref.isEmpty())
encounter = ref;
}
if (src.hasChild("effective[x]")) {
effective = ((DateTimeType) src.child("effective[x]").asDataType()).getValue();
Expand Down

0 comments on commit ce3ff06

Please sign in to comment.