Skip to content

Commit 0f55e5a

Browse files
committed
Add TriggerDefinition
1 parent fe08145 commit 0f55e5a

File tree

13 files changed

+496
-131
lines changed

13 files changed

+496
-131
lines changed

modules/fhir-structure/java/blaze/fhir/spec/type/Annotation.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@ public final class Annotation extends AbstractElement implements Complex, Extens
4343

4444
private static final Annotation EMPTY = new Annotation(ExtensionData.EMPTY, null, null, null);
4545

46-
private final Base author;
46+
private final Element author;
4747
private final DateTime time;
4848
private final Markdown text;
4949

50-
private Annotation(ExtensionData extensionData, Base author, DateTime time, Markdown text) {
50+
private Annotation(ExtensionData extensionData, Element author, DateTime time, Markdown text) {
5151
super(extensionData);
5252
this.author = author;
5353
this.time = time;
5454
this.text = text;
5555
}
5656

5757
public static Annotation create(IPersistentMap m) {
58-
return new Annotation(ExtensionData.fromMap(m), (Base) m.valAt(AUTHOR), (DateTime) m.valAt(TIME),
58+
return new Annotation(ExtensionData.fromMap(m), (Element) m.valAt(AUTHOR), (DateTime) m.valAt(TIME),
5959
(Markdown) m.valAt(TEXT));
6060
}
6161

@@ -101,7 +101,7 @@ public Iterator<Entry<Object, Object>> iterator() {
101101

102102
@Override
103103
public Annotation assoc(Object key, Object val) {
104-
if (key == AUTHOR) return new Annotation(extensionData, (Base) val, time, text);
104+
if (key == AUTHOR) return new Annotation(extensionData, (Element) val, time, text);
105105
if (key == TIME) return new Annotation(extensionData, author, (DateTime) val, text);
106106
if (key == TEXT) return new Annotation(extensionData, author, time, (Markdown) val);
107107
if (key == EXTENSION) return new Annotation(extensionData.withExtension(val), author, time, text);

modules/fhir-structure/java/blaze/fhir/spec/type/Dosage.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public final class Dosage extends AbstractBackboneElement implements Complex, Ex
8787
private final List<CodeableConcept> additionalInstruction;
8888
private final String patientInstruction;
8989
private final Timing timing;
90-
private final Base asNeeded;
90+
private final Element asNeeded;
9191
private final CodeableConcept site;
9292
private final CodeableConcept route;
9393
private final CodeableConcept method;
@@ -97,9 +97,10 @@ public final class Dosage extends AbstractBackboneElement implements Complex, Ex
9797
private final Quantity maxDosePerLifetime;
9898

9999
private Dosage(ExtensionData extensionData, List<Extension> modifierExtension, Integer sequence, String text,
100-
List<CodeableConcept> additionalInstruction, String patientInstruction, Timing timing, Base asNeeded,
101-
CodeableConcept site, CodeableConcept route, CodeableConcept method, List<DoseAndRate> doseAndRate,
102-
Ratio maxDosePerPeriod, Quantity maxDosePerAdministration, Quantity maxDosePerLifetime) {
100+
List<CodeableConcept> additionalInstruction, String patientInstruction, Timing timing,
101+
Element asNeeded, CodeableConcept site, CodeableConcept route, CodeableConcept method,
102+
List<DoseAndRate> doseAndRate, Ratio maxDosePerPeriod, Quantity maxDosePerAdministration,
103+
Quantity maxDosePerLifetime) {
103104
super(extensionData, modifierExtension);
104105
this.sequence = sequence;
105106
this.text = text;
@@ -119,7 +120,7 @@ private Dosage(ExtensionData extensionData, List<Extension> modifierExtension, I
119120
public static Dosage create(IPersistentMap m) {
120121
return new Dosage(ExtensionData.fromMap(m), Base.listFrom(m, MODIFIER_EXTENSION), (Integer) m.valAt(SEQUENCE),
121122
(String) m.valAt(TEXT), Base.listFrom(m, ADDITIONAL_INSTRUCTION), (String) m.valAt(PATIENT_INSTRUCTION),
122-
(Timing) m.valAt(TIMING), (Base) m.valAt(AS_NEEDED), (CodeableConcept) m.valAt(SITE),
123+
(Timing) m.valAt(TIMING), (Element) m.valAt(AS_NEEDED), (CodeableConcept) m.valAt(SITE),
123124
(CodeableConcept) m.valAt(ROUTE), (CodeableConcept) m.valAt(METHOD), Base.listFrom(m, DOSE_AND_RATE),
124125
(Ratio) m.valAt(MAX_DOSE_PER_PERIOD), (Quantity) m.valAt(MAX_DOSE_PER_ADMINISTRATION),
125126
(Quantity) m.valAt(MAX_DOSE_PER_LIFETIME));
@@ -243,7 +244,7 @@ public Dosage assoc(Object key, Object val) {
243244
if (key == TIMING)
244245
return new Dosage(extensionData, modifierExtension, sequence, text, additionalInstruction, patientInstruction, (Timing) val, asNeeded, site, route, method, doseAndRate, maxDosePerPeriod, maxDosePerAdministration, maxDosePerLifetime);
245246
if (key == AS_NEEDED)
246-
return new Dosage(extensionData, modifierExtension, sequence, text, additionalInstruction, patientInstruction, timing, (Base) val, site, route, method, doseAndRate, maxDosePerPeriod, maxDosePerAdministration, maxDosePerLifetime);
247+
return new Dosage(extensionData, modifierExtension, sequence, text, additionalInstruction, patientInstruction, timing, (Element) val, site, route, method, doseAndRate, maxDosePerPeriod, maxDosePerAdministration, maxDosePerLifetime);
247248
if (key == SITE)
248249
return new Dosage(extensionData, modifierExtension, sequence, text, additionalInstruction, patientInstruction, timing, asNeeded, (CodeableConcept) val, route, method, doseAndRate, maxDosePerPeriod, maxDosePerAdministration, maxDosePerLifetime);
249250
if (key == ROUTE)
@@ -498,19 +499,19 @@ public static class DoseAndRate extends AbstractElement implements Complex {
498499
private static final DoseAndRate EMPTY = new DoseAndRate(ExtensionData.EMPTY, null, null, null);
499500

500501
private final CodeableConcept type;
501-
private final Base dose;
502-
private final Base rate;
502+
private final Element dose;
503+
private final Element rate;
503504

504-
private DoseAndRate(ExtensionData extensionData, CodeableConcept type, Base dose, Base rate) {
505+
private DoseAndRate(ExtensionData extensionData, CodeableConcept type, Element dose, Element rate) {
505506
super(extensionData);
506507
this.type = type;
507508
this.dose = dose;
508509
this.rate = rate;
509510
}
510511

511512
public static DoseAndRate create(IPersistentMap m) {
512-
return new DoseAndRate(ExtensionData.fromMap(m), (CodeableConcept) m.valAt(TYPE), (Base) m.valAt(DOSE),
513-
(Base) m.valAt(RATE));
513+
return new DoseAndRate(ExtensionData.fromMap(m), (CodeableConcept) m.valAt(TYPE), (Element) m.valAt(DOSE),
514+
(Element) m.valAt(RATE));
514515
}
515516

516517
public CodeableConcept type() {
@@ -556,8 +557,8 @@ public Iterator<Entry<Object, Object>> iterator() {
556557
@Override
557558
public DoseAndRate assoc(Object key, Object val) {
558559
if (key == TYPE) return new DoseAndRate(extensionData, (CodeableConcept) val, dose, rate);
559-
if (key == DOSE) return new DoseAndRate(extensionData, type, (Base) val, rate);
560-
if (key == RATE) return new DoseAndRate(extensionData, type, dose, (Base) val);
560+
if (key == DOSE) return new DoseAndRate(extensionData, type, (Element) val, rate);
561+
if (key == RATE) return new DoseAndRate(extensionData, type, dose, (Element) val);
561562
if (key == EXTENSION) return new DoseAndRate(extensionData.withExtension(val), type, dose, rate);
562563
if (key == ID) return new DoseAndRate(extensionData.withId(val), type, dose, rate);
563564
return this;

modules/fhir-structure/java/blaze/fhir/spec/type/Timing.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public static class Repeat extends AbstractElement implements Complex {
283283
private static final Repeat EMPTY = new Repeat(ExtensionData.EMPTY, null, null, null, null, null, null, null,
284284
null, null, null, null, PersistentVector.EMPTY, PersistentVector.EMPTY, PersistentVector.EMPTY, null);
285285

286-
private final Base bounds;
286+
private final Element bounds;
287287
private final PositiveInt count;
288288
private final PositiveInt countMax;
289289
private final Decimal duration;
@@ -299,7 +299,7 @@ public static class Repeat extends AbstractElement implements Complex {
299299
private final List<Code> when;
300300
private final UnsignedInt offset;
301301

302-
private Repeat(ExtensionData extensionData, Base bounds, PositiveInt count, PositiveInt countMax,
302+
private Repeat(ExtensionData extensionData, Element bounds, PositiveInt count, PositiveInt countMax,
303303
Decimal duration, Decimal durationMax, Code durationUnit, PositiveInt frequency,
304304
PositiveInt frequencyMax, Decimal period, Decimal periodMax, Code periodUnit,
305305
List<Code> dayOfWeek, List<Time> timeOfDay, List<Code> when, UnsignedInt offset) {
@@ -327,7 +327,7 @@ public static Repeat create(IPersistentMap m) {
327327
throw new IllegalArgumentException("Expecting bounds to be either a Duration, Range or Period but was a `" +
328328
bounds.getClass().getSimpleName() + "`.");
329329
}
330-
return new Repeat(ExtensionData.fromMap(m), (Base) bounds, (PositiveInt) m.valAt(COUNT),
330+
return new Repeat(ExtensionData.fromMap(m), (Element) bounds, (PositiveInt) m.valAt(COUNT),
331331
(PositiveInt) m.valAt(COUNT_MAX), (Decimal) m.valAt(DURATION), (Decimal) m.valAt(DURATION_MAX),
332332
(Code) m.valAt(DURATION_UNIT), (PositiveInt) m.valAt(FREQUENCY), (PositiveInt) m.valAt(FREQUENCY_MAX),
333333
(Decimal) m.valAt(PERIOD), (Decimal) m.valAt(PERIOD_MAX), (Code) m.valAt(PERIOD_UNIT),
@@ -395,7 +395,7 @@ public Iterator<Entry<Object, Object>> iterator() {
395395

396396
@Override
397397
public Repeat assoc(Object key, Object val) {
398-
if (key == BOUNDS) return new Repeat(extensionData, (Base) val, count, countMax, duration, durationMax,
398+
if (key == BOUNDS) return new Repeat(extensionData, (Element) val, count, countMax, duration, durationMax,
399399
durationUnit, frequency, frequencyMax, period, periodMax, periodUnit, dayOfWeek, timeOfDay, when,
400400
offset);
401401
if (key == COUNT) return new Repeat(extensionData, bounds, (PositiveInt) val, countMax, duration,

0 commit comments

Comments
 (0)