Skip to content

Commit

Permalink
Merge pull request #1389 from hapifhir/2023-08-gg-combine-fixes
Browse files Browse the repository at this point in the history
2023 08 gg combine fixes
  • Loading branch information
grahamegrieve authored Aug 9, 2023
2 parents 444c33d + 952dedd commit e2f9ee0
Show file tree
Hide file tree
Showing 947 changed files with 9,707 additions and 9,639 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ private void doImport(String src, String version, String dst) throws FHIRExcepti
new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(dst), cs);
produceDB(Utilities.changeFileExt(dst, ".db"), cs);

cs.getConcept().removeIf(cc -> !Utilities.existsInList(cc.getCode(), "metadata-kinds", "metadata-designations", "99202", "99203", "25", "P1"));
cs.setContent(CodeSystemContentMode.FRAGMENT);
cs.getConcept().removeIf(cc -> !Utilities.existsInList(cc.getCode(), "metadata-kinds", "metadata-designations", "99202", "99203", "0001A", "25", "P1", "1P", "F1"));
new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.changeFileExt(dst, "-fragment.json")), cs);
produceDB(Utilities.changeFileExt(dst, "-fragment.db"), cs);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ private boolean generateChildAddItem(String indent, String parent, boolean first
first = false;
write( "if (name.equals(\""+namet+"\")) {\r\n");
if (isPrimitive(e.typeSummary()) || e.typeSummary().startsWith("canonical("))
write(indent+" throw new FHIRException(\"Cannot call addChild on a primitive type "+parent+"."+e.getName()+"\");\r\n");
write(indent+" throw new FHIRException(\"Cannot call addChild on a singleton property "+parent+"."+e.getName()+"\");\r\n");
else if (isAbstract(e.typeSummary()))
write(indent+" throw new FHIRException(\"Cannot call addChild on an abstract type "+parent+"."+e.getName()+"\");\r\n");
else if (e.unbounded()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,12 +782,12 @@ public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) {
return addIdentifier();
} else if (name.equals("name")) {
throw new FHIRException("Cannot call addChild on a primitive type Account.name");
throw new FHIRException("Cannot call addChild on a singleton property Account.name");
} else if (name.equals("type")) {
this.type = new CodeableConcept();
return this.type;
} else if (name.equals("status")) {
throw new FHIRException("Cannot call addChild on a primitive type Account.status");
throw new FHIRException("Cannot call addChild on a singleton property Account.status");
} else if (name.equals("activePeriod")) {
this.activePeriod = new Period();
return this.activePeriod;
Expand All @@ -807,7 +807,7 @@ public Base addChild(String name) throws FHIRException {
this.owner = new Reference();
return this.owner;
} else if (name.equals("description")) {
throw new FHIRException("Cannot call addChild on a primitive type Account.description");
throw new FHIRException("Cannot call addChild on a singleton property Account.description");
} else
return super.addChild(name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1011,23 +1011,23 @@ else if (name.equals("period"))
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("use")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.use");
throw new FHIRException("Cannot call addChild on a singleton property Address.use");
} else if (name.equals("type")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.type");
throw new FHIRException("Cannot call addChild on a singleton property Address.type");
} else if (name.equals("text")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.text");
throw new FHIRException("Cannot call addChild on a singleton property Address.text");
} else if (name.equals("line")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.line");
throw new FHIRException("Cannot call addChild on a singleton property Address.line");
} else if (name.equals("city")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.city");
throw new FHIRException("Cannot call addChild on a singleton property Address.city");
} else if (name.equals("district")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.district");
throw new FHIRException("Cannot call addChild on a singleton property Address.district");
} else if (name.equals("state")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.state");
throw new FHIRException("Cannot call addChild on a singleton property Address.state");
} else if (name.equals("postalCode")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.postalCode");
throw new FHIRException("Cannot call addChild on a singleton property Address.postalCode");
} else if (name.equals("country")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.country");
throw new FHIRException("Cannot call addChild on a singleton property Address.country");
} else if (name.equals("period")) {
this.period = new Period();
return this.period;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1443,15 +1443,15 @@ public Base addChild(String name) throws FHIRException {
this.substance = new CodeableConcept();
return this.substance;
} else if (name.equals("certainty")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.certainty");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.certainty");
} else if (name.equals("manifestation")) {
return addManifestation();
} else if (name.equals("description")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.description");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.description");
} else if (name.equals("onset")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.onset");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.onset");
} else if (name.equals("severity")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.severity");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.severity");
} else if (name.equals("exposureRoute")) {
this.exposureRoute = new CodeableConcept();
return this.exposureRoute;
Expand Down Expand Up @@ -2433,9 +2433,9 @@ public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) {
return addIdentifier();
} else if (name.equals("onset")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.onset");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.onset");
} else if (name.equals("recordedDate")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.recordedDate");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.recordedDate");
} else if (name.equals("recorder")) {
this.recorder = new Reference();
return this.recorder;
Expand All @@ -2449,15 +2449,15 @@ public Base addChild(String name) throws FHIRException {
this.substance = new CodeableConcept();
return this.substance;
} else if (name.equals("status")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.status");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.status");
} else if (name.equals("criticality")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.criticality");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.criticality");
} else if (name.equals("type")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.type");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.type");
} else if (name.equals("category")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.category");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.category");
} else if (name.equals("lastOccurence")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.lastOccurence");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.lastOccurence");
} else if (name.equals("note")) {
this.note = new Annotation();
return this.note;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ public Base addChild(String name) throws FHIRException {
this.author = new StringType();
return this.author;
} else if (name.equals("time")) {
throw new FHIRException("Cannot call addChild on a primitive type Annotation.time");
throw new FHIRException("Cannot call addChild on a singleton property Annotation.time");
} else if (name.equals("text")) {
throw new FHIRException("Cannot call addChild on a primitive type Annotation.text");
throw new FHIRException("Cannot call addChild on a singleton property Annotation.text");
} else
return super.addChild(name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -853,9 +853,9 @@ public Base addChild(String name) throws FHIRException {
this.actor = new Reference();
return this.actor;
} else if (name.equals("required")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.required");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.required");
} else if (name.equals("status")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.status");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.status");
} else
return super.addChild(name);
}
Expand Down Expand Up @@ -1730,27 +1730,27 @@ public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) {
return addIdentifier();
} else if (name.equals("status")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.status");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.status");
} else if (name.equals("type")) {
this.type = new CodeableConcept();
return this.type;
} else if (name.equals("reason")) {
this.reason = new CodeableConcept();
return this.reason;
} else if (name.equals("priority")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.priority");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.priority");
} else if (name.equals("description")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.description");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.description");
} else if (name.equals("start")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.start");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.start");
} else if (name.equals("end")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.end");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.end");
} else if (name.equals("minutesDuration")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.minutesDuration");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.minutesDuration");
} else if (name.equals("slot")) {
return addSlot();
} else if (name.equals("comment")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.comment");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.comment");
} else if (name.equals("participant")) {
return addParticipant();
} else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -824,18 +824,18 @@ public Base addChild(String name) throws FHIRException {
this.appointment = new Reference();
return this.appointment;
} else if (name.equals("start")) {
throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.start");
throw new FHIRException("Cannot call addChild on a singleton property AppointmentResponse.start");
} else if (name.equals("end")) {
throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.end");
throw new FHIRException("Cannot call addChild on a singleton property AppointmentResponse.end");
} else if (name.equals("participantType")) {
return addParticipantType();
} else if (name.equals("actor")) {
this.actor = new Reference();
return this.actor;
} else if (name.equals("participantStatus")) {
throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.participantStatus");
throw new FHIRException("Cannot call addChild on a singleton property AppointmentResponse.participantStatus");
} else if (name.equals("comment")) {
throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.comment");
throw new FHIRException("Cannot call addChild on a singleton property AppointmentResponse.comment");
} else
return super.addChild(name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -613,21 +613,21 @@ else if (name.equals("creation"))
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("contentType")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.contentType");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.contentType");
} else if (name.equals("language")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.language");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.language");
} else if (name.equals("data")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.data");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.data");
} else if (name.equals("url")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.url");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.url");
} else if (name.equals("size")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.size");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.size");
} else if (name.equals("hash")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.hash");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.hash");
} else if (name.equals("title")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.title");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.title");
} else if (name.equals("creation")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.creation");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.creation");
} else
return super.addChild(name);
}
Expand Down
Loading

0 comments on commit e2f9ee0

Please sign in to comment.