Skip to content

Commit

Permalink
issue #2145 - set the StandardsStatus appropriately
Browse files Browse the repository at this point in the history
I had used the wiki page at
https://confluence.hl7.org/display/FHIR/FHIR+Maturity+Model to determine
what was draft/trial/normative, but in the StructureDefinition resources
there was a different field for this.

Net: my prior commit used "Trial Use" for FFM5, but the normative
resources actually have a level of 5 as well...we just needed to pull
the status from the other extension.

1. generate a code subtype class for StandardsStatus
2. change MaturityLeve(value) to Maturity(level, status)
3. regenerate the model

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
  • Loading branch information
lmsurpre committed Mar 25, 2021
1 parent f263919 commit c20be8d
Show file tree
Hide file tree
Showing 150 changed files with 1,353 additions and 446 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

import com.ibm.fhir.model.type.code.StandardsStatus;

/**
* @see <a href="https://confluence.hl7.org/display/FHIR/FHIR+Maturity+Model">https://confluence.hl7.org/display/FHIR/FHIR+Maturity+Model</a>
*/
@Retention(RetentionPolicy.RUNTIME)
public @interface MaturityLevel {
int value();
public @interface Maturity {
int level();
StandardsStatus.ValueSet status();
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import javax.annotation.Generated;

import com.ibm.fhir.model.annotation.Binding;
import com.ibm.fhir.model.annotation.MaturityLevel;
import com.ibm.fhir.model.annotation.Maturity;
import com.ibm.fhir.model.annotation.ReferenceTarget;
import com.ibm.fhir.model.annotation.Required;
import com.ibm.fhir.model.annotation.Summary;
Expand All @@ -34,16 +34,20 @@
import com.ibm.fhir.model.type.Uri;
import com.ibm.fhir.model.type.code.AccountStatus;
import com.ibm.fhir.model.type.code.BindingStrength;
import com.ibm.fhir.model.type.code.StandardsStatus;
import com.ibm.fhir.model.util.ValidationSupport;
import com.ibm.fhir.model.visitor.Visitor;

/**
* A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges
* for a patient, cost centers, etc.
*
* <p>Maturity level: FMM2 (Trial Use)
* <p>Maturity level: FMM2 (trial-use)
*/
@MaturityLevel(2)
@Maturity(
level = 2,
status = StandardsStatus.ValueSet.TRIAL_USE
)
@Generated("com.ibm.fhir.tools.CodeGenerator")
public class Account extends DomainResource {
@Summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import com.ibm.fhir.model.annotation.Binding;
import com.ibm.fhir.model.annotation.Choice;
import com.ibm.fhir.model.annotation.Constraint;
import com.ibm.fhir.model.annotation.MaturityLevel;
import com.ibm.fhir.model.annotation.Maturity;
import com.ibm.fhir.model.annotation.ReferenceTarget;
import com.ibm.fhir.model.annotation.Required;
import com.ibm.fhir.model.annotation.Summary;
Expand Down Expand Up @@ -54,16 +54,20 @@
import com.ibm.fhir.model.type.code.PublicationStatus;
import com.ibm.fhir.model.type.code.RequestIntent;
import com.ibm.fhir.model.type.code.RequestPriority;
import com.ibm.fhir.model.type.code.StandardsStatus;
import com.ibm.fhir.model.util.ValidationSupport;
import com.ibm.fhir.model.visitor.Visitor;

/**
* This resource allows for the definition of some activity to be performed, independent of a particular patient,
* practitioner, or other performance context.
*
* <p>Maturity level: FMM2 (Trial Use)
* <p>Maturity level: FMM2 (trial-use)
*/
@MaturityLevel(2)
@Maturity(
level = 2,
status = StandardsStatus.ValueSet.TRIAL_USE
)
@Constraint(
id = "adf-0",
level = "Warning",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import com.ibm.fhir.model.annotation.Binding;
import com.ibm.fhir.model.annotation.Constraint;
import com.ibm.fhir.model.annotation.MaturityLevel;
import com.ibm.fhir.model.annotation.Maturity;
import com.ibm.fhir.model.annotation.ReferenceTarget;
import com.ibm.fhir.model.annotation.Required;
import com.ibm.fhir.model.annotation.Summary;
Expand All @@ -33,6 +33,7 @@
import com.ibm.fhir.model.type.Uri;
import com.ibm.fhir.model.type.code.AdverseEventActuality;
import com.ibm.fhir.model.type.code.BindingStrength;
import com.ibm.fhir.model.type.code.StandardsStatus;
import com.ibm.fhir.model.util.ValidationSupport;
import com.ibm.fhir.model.visitor.Visitor;

Expand All @@ -41,9 +42,12 @@
* a research study or other healthcare setting factors that requires additional monitoring, treatment, or
* hospitalization, or that results in death.
*
* <p>Maturity level: FMM0 (Draft)
* <p>Maturity level: FMM0 (trial-use)
*/
@MaturityLevel(0)
@Maturity(
level = 0,
status = StandardsStatus.ValueSet.TRIAL_USE
)
@Constraint(
id = "adverseEvent-0",
level = "Warning",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import com.ibm.fhir.model.annotation.Binding;
import com.ibm.fhir.model.annotation.Choice;
import com.ibm.fhir.model.annotation.Constraint;
import com.ibm.fhir.model.annotation.MaturityLevel;
import com.ibm.fhir.model.annotation.Maturity;
import com.ibm.fhir.model.annotation.ReferenceTarget;
import com.ibm.fhir.model.annotation.Required;
import com.ibm.fhir.model.annotation.Summary;
Expand All @@ -42,16 +42,20 @@
import com.ibm.fhir.model.type.code.AllergyIntoleranceSeverity;
import com.ibm.fhir.model.type.code.AllergyIntoleranceType;
import com.ibm.fhir.model.type.code.BindingStrength;
import com.ibm.fhir.model.type.code.StandardsStatus;
import com.ibm.fhir.model.util.ValidationSupport;
import com.ibm.fhir.model.visitor.Visitor;

/**
* Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure
* to a substance.
*
* <p>Maturity level: FMM3 (Trial Use)
* <p>Maturity level: FMM3 (trial-use)
*/
@MaturityLevel(3)
@Maturity(
level = 3,
status = StandardsStatus.ValueSet.TRIAL_USE
)
@Constraint(
id = "ait-1",
level = "Rule",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import com.ibm.fhir.model.annotation.Binding;
import com.ibm.fhir.model.annotation.Constraint;
import com.ibm.fhir.model.annotation.MaturityLevel;
import com.ibm.fhir.model.annotation.Maturity;
import com.ibm.fhir.model.annotation.ReferenceTarget;
import com.ibm.fhir.model.annotation.Required;
import com.ibm.fhir.model.annotation.Summary;
Expand All @@ -39,16 +39,20 @@
import com.ibm.fhir.model.type.code.BindingStrength;
import com.ibm.fhir.model.type.code.ParticipantRequired;
import com.ibm.fhir.model.type.code.ParticipationStatus;
import com.ibm.fhir.model.type.code.StandardsStatus;
import com.ibm.fhir.model.util.ValidationSupport;
import com.ibm.fhir.model.visitor.Visitor;

/**
* A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific
* date/time. This may result in one or more Encounter(s).
*
* <p>Maturity level: FMM3 (Trial Use)
* <p>Maturity level: FMM3 (trial-use)
*/
@MaturityLevel(3)
@Maturity(
level = 3,
status = StandardsStatus.ValueSet.TRIAL_USE
)
@Constraint(
id = "app-1",
level = "Rule",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import com.ibm.fhir.model.annotation.Binding;
import com.ibm.fhir.model.annotation.Constraint;
import com.ibm.fhir.model.annotation.MaturityLevel;
import com.ibm.fhir.model.annotation.Maturity;
import com.ibm.fhir.model.annotation.ReferenceTarget;
import com.ibm.fhir.model.annotation.Required;
import com.ibm.fhir.model.annotation.Summary;
Expand All @@ -32,15 +32,19 @@
import com.ibm.fhir.model.type.Uri;
import com.ibm.fhir.model.type.code.BindingStrength;
import com.ibm.fhir.model.type.code.ParticipantStatus;
import com.ibm.fhir.model.type.code.StandardsStatus;
import com.ibm.fhir.model.util.ValidationSupport;
import com.ibm.fhir.model.visitor.Visitor;

/**
* A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
*
* <p>Maturity level: FMM3 (Trial Use)
* <p>Maturity level: FMM3 (trial-use)
*/
@MaturityLevel(3)
@Maturity(
level = 3,
status = StandardsStatus.ValueSet.TRIAL_USE
)
@Constraint(
id = "apr-1",
level = "Rule",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import com.ibm.fhir.model.annotation.Binding;
import com.ibm.fhir.model.annotation.Choice;
import com.ibm.fhir.model.annotation.Constraint;
import com.ibm.fhir.model.annotation.MaturityLevel;
import com.ibm.fhir.model.annotation.Maturity;
import com.ibm.fhir.model.annotation.ReferenceTarget;
import com.ibm.fhir.model.annotation.Required;
import com.ibm.fhir.model.annotation.Summary;
Expand All @@ -40,16 +40,20 @@
import com.ibm.fhir.model.type.code.AuditEventAgentNetworkType;
import com.ibm.fhir.model.type.code.AuditEventOutcome;
import com.ibm.fhir.model.type.code.BindingStrength;
import com.ibm.fhir.model.type.code.StandardsStatus;
import com.ibm.fhir.model.util.ValidationSupport;
import com.ibm.fhir.model.visitor.Visitor;

/**
* A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion
* attempts and monitoring for inappropriate usage.
*
* <p>Maturity level: FMM3 (Trial Use)
* <p>Maturity level: FMM3 (trial-use)
*/
@MaturityLevel(3)
@Maturity(
level = 3,
status = StandardsStatus.ValueSet.TRIAL_USE
)
@Constraint(
id = "sev-1",
level = "Rule",
Expand Down
10 changes: 7 additions & 3 deletions fhir-model/src/main/java/com/ibm/fhir/model/resource/Basic.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import javax.annotation.Generated;

import com.ibm.fhir.model.annotation.Binding;
import com.ibm.fhir.model.annotation.MaturityLevel;
import com.ibm.fhir.model.annotation.Maturity;
import com.ibm.fhir.model.annotation.ReferenceTarget;
import com.ibm.fhir.model.annotation.Required;
import com.ibm.fhir.model.annotation.Summary;
Expand All @@ -29,16 +29,20 @@
import com.ibm.fhir.model.type.Reference;
import com.ibm.fhir.model.type.Uri;
import com.ibm.fhir.model.type.code.BindingStrength;
import com.ibm.fhir.model.type.code.StandardsStatus;
import com.ibm.fhir.model.util.ValidationSupport;
import com.ibm.fhir.model.visitor.Visitor;

/**
* Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing
* resource, and custom resources not appropriate for inclusion in the FHIR specification.
*
* <p>Maturity level: FMM1 (Trial Use)
* <p>Maturity level: FMM1 (trial-use)
*/
@MaturityLevel(1)
@Maturity(
level = 1,
status = StandardsStatus.ValueSet.TRIAL_USE
)
@Generated("com.ibm.fhir.tools.CodeGenerator")
public class Basic extends DomainResource {
@Summary
Expand Down
10 changes: 7 additions & 3 deletions fhir-model/src/main/java/com/ibm/fhir/model/resource/Binary.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import javax.annotation.Generated;

import com.ibm.fhir.model.annotation.Binding;
import com.ibm.fhir.model.annotation.MaturityLevel;
import com.ibm.fhir.model.annotation.Maturity;
import com.ibm.fhir.model.annotation.Required;
import com.ibm.fhir.model.annotation.Summary;
import com.ibm.fhir.model.type.Base64Binary;
Expand All @@ -20,16 +20,20 @@
import com.ibm.fhir.model.type.Reference;
import com.ibm.fhir.model.type.Uri;
import com.ibm.fhir.model.type.code.BindingStrength;
import com.ibm.fhir.model.type.code.StandardsStatus;
import com.ibm.fhir.model.util.ValidationSupport;
import com.ibm.fhir.model.visitor.Visitor;

/**
* A resource that represents the data of a single raw artifact as digital content accessible in its native format. A
* Binary resource can contain any content, whether text, image, pdf, zip archive, etc.
*
* <p>Maturity level: FMM5 (Trial Use)
* <p>Maturity level: FMM5 (normative)
*/
@MaturityLevel(5)
@Maturity(
level = 5,
status = StandardsStatus.ValueSet.NORMATIVE
)
@Generated("com.ibm.fhir.tools.CodeGenerator")
public class Binary extends Resource {
@Summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import com.ibm.fhir.model.annotation.Binding;
import com.ibm.fhir.model.annotation.Choice;
import com.ibm.fhir.model.annotation.MaturityLevel;
import com.ibm.fhir.model.annotation.Maturity;
import com.ibm.fhir.model.annotation.ReferenceTarget;
import com.ibm.fhir.model.annotation.Summary;
import com.ibm.fhir.model.type.BackboneElement;
Expand All @@ -37,16 +37,20 @@
import com.ibm.fhir.model.type.code.BiologicallyDerivedProductCategory;
import com.ibm.fhir.model.type.code.BiologicallyDerivedProductStatus;
import com.ibm.fhir.model.type.code.BiologicallyDerivedProductStorageScale;
import com.ibm.fhir.model.type.code.StandardsStatus;
import com.ibm.fhir.model.util.ValidationSupport;
import com.ibm.fhir.model.visitor.Visitor;

/**
* A material substance originating from a biological entity intended to be transplanted or infused
* into another (possibly the same) biological entity.
*
* <p>Maturity level: FMM0 (Draft)
* <p>Maturity level: FMM0 (trial-use)
*/
@MaturityLevel(0)
@Maturity(
level = 0,
status = StandardsStatus.ValueSet.TRIAL_USE
)
@Generated("com.ibm.fhir.tools.CodeGenerator")
public class BiologicallyDerivedProduct extends DomainResource {
@Summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import javax.annotation.Generated;

import com.ibm.fhir.model.annotation.Binding;
import com.ibm.fhir.model.annotation.MaturityLevel;
import com.ibm.fhir.model.annotation.Maturity;
import com.ibm.fhir.model.annotation.ReferenceTarget;
import com.ibm.fhir.model.annotation.Required;
import com.ibm.fhir.model.annotation.Summary;
Expand All @@ -31,16 +31,20 @@
import com.ibm.fhir.model.type.String;
import com.ibm.fhir.model.type.Uri;
import com.ibm.fhir.model.type.code.BindingStrength;
import com.ibm.fhir.model.type.code.StandardsStatus;
import com.ibm.fhir.model.util.ValidationSupport;
import com.ibm.fhir.model.visitor.Visitor;

/**
* Record details about an anatomical structure. This resource may be used when a coded concept does not provide the
* necessary detail needed for the use case.
*
* <p>Maturity level: FMM1 (Trial Use)
* <p>Maturity level: FMM1 (trial-use)
*/
@MaturityLevel(1)
@Maturity(
level = 1,
status = StandardsStatus.ValueSet.TRIAL_USE
)
@Generated("com.ibm.fhir.tools.CodeGenerator")
public class BodyStructure extends DomainResource {
@Summary
Expand Down
10 changes: 7 additions & 3 deletions fhir-model/src/main/java/com/ibm/fhir/model/resource/Bundle.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import com.ibm.fhir.model.annotation.Binding;
import com.ibm.fhir.model.annotation.Constraint;
import com.ibm.fhir.model.annotation.MaturityLevel;
import com.ibm.fhir.model.annotation.Maturity;
import com.ibm.fhir.model.annotation.Required;
import com.ibm.fhir.model.annotation.Summary;
import com.ibm.fhir.model.type.BackboneElement;
Expand All @@ -34,15 +34,19 @@
import com.ibm.fhir.model.type.code.BundleType;
import com.ibm.fhir.model.type.code.HTTPVerb;
import com.ibm.fhir.model.type.code.SearchEntryMode;
import com.ibm.fhir.model.type.code.StandardsStatus;
import com.ibm.fhir.model.util.ValidationSupport;
import com.ibm.fhir.model.visitor.Visitor;

/**
* A container for a collection of resources.
*
* <p>Maturity level: FMM5 (Trial Use)
* <p>Maturity level: FMM5 (normative)
*/
@MaturityLevel(5)
@Maturity(
level = 5,
status = StandardsStatus.ValueSet.NORMATIVE
)
@Constraint(
id = "bdl-1",
level = "Rule",
Expand Down
Loading

0 comments on commit c20be8d

Please sign in to comment.