Update for QA version of DSTU2

This commit is contained in:
James Agnew 2015-08-09 11:18:04 -04:00
parent b36e4e5841
commit 24634880db
957 changed files with 556765 additions and 1339501 deletions

View File

@ -76,13 +76,17 @@
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons_io_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons_codec_version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons_lang_version}</version>
</dependency>
<!-- Android does not come with the Servlet API bundled, and MethodUtil
requires it -->

View File

@ -46,8 +46,14 @@ public interface BaseOperationOutcome extends IResource, IBaseOperationOutcome {
public abstract BaseIssue addLocation(String theString);
/**
* @deprecated Use {@link #setDiagnostics(String)} instead - Field was renamed in DSTU2
*/
@Deprecated
public abstract BaseIssue setDetails(String theString);
public abstract BaseIssue setDiagnostics(String theString);
public abstract StringDt getLocationFirstRep();
}

View File

@ -0,0 +1,10 @@
package ca.uhn.fhir.model.primitive;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import net.sourceforge.cobertura.CoverageIgnore;
@DatatypeDef(name = "markdown")
@CoverageIgnore
public class MarkdownDt extends StringDt {
}

View File

@ -33,6 +33,7 @@ import ca.uhn.fhir.context.BaseRuntimeChildDefinition;
import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition;
import ca.uhn.fhir.context.BaseRuntimeElementDefinition;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;
import ca.uhn.fhir.context.RuntimeResourceDefinition;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
@ -86,7 +87,11 @@ public class OperationOutcomeUtil {
}
public static String getFirstIssueDetails(FhirContext theCtx, IBaseOperationOutcome theOutcome) {
return getFirstIssueStringPart(theCtx, theOutcome, "details");
if (theCtx.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU1)) {
return getFirstIssueStringPart(theCtx, theOutcome, "diagnostics");
} else {
return getFirstIssueStringPart(theCtx, theOutcome, "details");
}
}
public static String getFirstIssueLocation(FhirContext theCtx, IBaseOperationOutcome theOutcome) {
@ -142,7 +147,12 @@ public class OperationOutcomeUtil {
private static void populateDetails(FhirContext theCtx, IBase theIssue, String theSeverity, String theDetails, String theLocation) {
BaseRuntimeElementCompositeDefinition<?> issueElement = (BaseRuntimeElementCompositeDefinition<?>) theCtx.getElementDefinition(theIssue.getClass());
BaseRuntimeChildDefinition detailsChild = issueElement.getChildByName("details");
BaseRuntimeChildDefinition detailsChild;
if (theCtx.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU1)) {
detailsChild = issueElement.getChildByName("diagnostics");
} else {
detailsChild = issueElement.getChildByName("details");
}
BaseRuntimeElementDefinition<?> stringDef = theCtx.getElementDefinition("string");
BaseRuntimeChildDefinition severityChild = issueElement.getChildByName("severity");
BaseRuntimeChildDefinition locationChild = issueElement.getChildByName("location");

View File

@ -28,16 +28,16 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu2.resource.OperationOutcome;
import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
import ca.uhn.fhir.model.dstu2.resource.QuestionnaireAnswers;
import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
import ca.uhn.fhir.model.dstu2.resource.ValueSet;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
import ca.uhn.fhir.validation.FhirQuestionnaireAnswersValidator;
import ca.uhn.fhir.validation.FhirQuestionnaireResponseValidator;
import ca.uhn.fhir.validation.FhirValidator;
import ca.uhn.fhir.validation.IResourceLoader;
import ca.uhn.fhir.validation.ValidationResult;
public class FhirResourceDaoQuestionnaireAnswersDstu2 extends FhirResourceDaoDstu2<QuestionnaireAnswers> {
public class FhirResourceDaoQuestionnaireResponseDstu2 extends FhirResourceDaoDstu2<QuestionnaireResponse> {
private FhirContext myRefImplCtx = FhirContext.forDstu2Hl7Org();
@ -45,7 +45,7 @@ public class FhirResourceDaoQuestionnaireAnswersDstu2 extends FhirResourceDaoDst
protected void validateResourceForStorage(IResource theResource) {
super.validateResourceForStorage(theResource);
QuestionnaireAnswers qa = (QuestionnaireAnswers) theResource;
QuestionnaireResponse qa = (QuestionnaireResponse) theResource;
if (qa == null || qa.getQuestionnaire() == null || qa.getQuestionnaire().getReference() == null || qa.getQuestionnaire().getReference().isEmpty()) {
return;
}
@ -54,7 +54,7 @@ public class FhirResourceDaoQuestionnaireAnswersDstu2 extends FhirResourceDaoDst
val.setValidateAgainstStandardSchema(false);
val.setValidateAgainstStandardSchematron(false);
FhirQuestionnaireAnswersValidator module = new FhirQuestionnaireAnswersValidator();
FhirQuestionnaireResponseValidator module = new FhirQuestionnaireResponseValidator();
module.setResourceLoader(new JpaResourceLoader());
val.registerValidatorModule(module);
@ -70,7 +70,7 @@ public class FhirResourceDaoQuestionnaireAnswersDstu2 extends FhirResourceDaoDst
@Override
public <T extends IBaseResource> T load(Class<T> theType, IIdType theId) throws ResourceNotFoundException {
/*
* The QuestionnaireAnswers validator uses RI structures, so for now we need
* The QuestionnaireResponse validator uses RI structures, so for now we need
* to convert between that and HAPI structures. This is a bit hackish, but
* hopefully it will go away at some point.
*/

View File

@ -67,7 +67,7 @@ import ca.uhn.fhir.model.dstu2.resource.Observation;
import ca.uhn.fhir.model.dstu2.resource.Organization;
import ca.uhn.fhir.model.dstu2.resource.Patient;
import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
import ca.uhn.fhir.model.dstu2.resource.QuestionnaireAnswers;
import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum;
import ca.uhn.fhir.model.dstu2.valueset.QuantityComparatorEnum;
@ -111,7 +111,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaTest {
private static IFhirResourceDao<Organization> ourOrganizationDao;
private static IFhirResourceDao<Patient> ourPatientDao;
@SuppressWarnings("unused")
private static IFhirResourceDao<QuestionnaireAnswers> ourQuestionnaireAnswersDao;
private static IFhirResourceDao<QuestionnaireResponse> ourQuestionnaireResponseDao;
private static IFhirResourceDao<Questionnaire> ourQuestionnaireDao;
private static IFhirSystemDao<Bundle> ourSystemDao;
@ -2989,7 +2989,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaTest {
ourEncounterDao = ourCtx.getBean("myEncounterDaoDstu2", IFhirResourceDao.class);
ourSystemDao = ourCtx.getBean("mySystemDaoDstu2", IFhirSystemDao.class);
ourQuestionnaireDao = ourCtx.getBean("myQuestionnaireDaoDstu2", IFhirResourceDao.class);
ourQuestionnaireAnswersDao = ourCtx.getBean("myQuestionnaireAnswersDaoDstu2", IFhirResourceDao.class);
ourQuestionnaireResponseDao = ourCtx.getBean("myQuestionnaireResponseDaoDstu2", IFhirResourceDao.class);
ourFhirCtx = ourCtx.getBean(FhirContext.class);
}

View File

@ -228,19 +228,19 @@ public class FhirSystemDaoDstu2Test extends BaseJpaTest {
// Bundle.entry[0] is operation outcome
assertEquals(OperationOutcome.class, resp.getEntry().get(0).getResource().getClass());
assertEquals(IssueSeverityEnum.INFORMATION, ((OperationOutcome)resp.getEntry().get(0).getResource()).getIssue().get(0).getSeverityElement().getValueAsEnum());
assertThat(((OperationOutcome)resp.getEntry().get(0).getResource()).getIssue().get(0).getDetails(), startsWith("Batch completed in "));
assertThat(((OperationOutcome)resp.getEntry().get(0).getResource()).getIssue().get(0).getDiagnostics(), startsWith("Batch completed in "));
// Bundle.entry[1] is create response
assertEquals(OperationOutcome.class, resp.getEntry().get(1).getResource().getClass());
assertEquals(IssueSeverityEnum.INFORMATION, ((OperationOutcome)resp.getEntry().get(1).getResource()).getIssue().get(0).getSeverityElement().getValueAsEnum());
assertThat(((OperationOutcome)resp.getEntry().get(1).getResource()).getIssue().get(0).getDetails(), startsWith("Batch sub-request completed in"));
assertThat(((OperationOutcome)resp.getEntry().get(1).getResource()).getIssue().get(0).getDiagnostics(), startsWith("Batch sub-request completed in"));
assertEquals("201 Created", resp.getEntry().get(1).getResponse().getStatus());
assertThat(resp.getEntry().get(1).getResponse().getLocation(), startsWith("Patient/"));
// Bundle.entry[2] is failed read response
assertEquals(OperationOutcome.class, resp.getEntry().get(2).getResource().getClass());
assertEquals(IssueSeverityEnum.ERROR, ((OperationOutcome)resp.getEntry().get(2).getResource()).getIssue().get(0).getSeverityElement().getValueAsEnum());
assertEquals("Resource Patient/THIS_ID_DOESNT_EXIST is not known", ((OperationOutcome)resp.getEntry().get(2).getResource()).getIssue().get(0).getDetails());
assertEquals("Resource Patient/THIS_ID_DOESNT_EXIST is not known", ((OperationOutcome)resp.getEntry().get(2).getResource()).getIssue().get(0).getDiagnostics());
assertEquals("404 Not Found", resp.getEntry().get(2).getResponse().getStatus());
// Check POST
@ -1047,7 +1047,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaTest {
assertEquals(OperationOutcome.class, resp.getEntry().get(0).getResource().getClass());
OperationOutcome outcome = (OperationOutcome) resp.getEntry().get(0).getResource();
assertThat(outcome.getIssue().get(1).getDetails(), containsString("Placeholder resource ID \"urn:oid:0.1.2.3\" was replaced with permanent ID \"Patient/"));
assertThat(outcome.getIssue().get(1).getDiagnostics(), containsString("Placeholder resource ID \"urn:oid:0.1.2.3\" was replaced with permanent ID \"Patient/"));
assertTrue(resp.getEntry().get(1).getResponse().getLocation(), new IdDt(resp.getEntry().get(1).getResponse().getLocation()).getIdPart().matches("^[0-9]+$"));
assertTrue(resp.getEntry().get(2).getResponse().getLocation(), new IdDt(resp.getEntry().get(2).getResponse().getLocation()).getIdPart().matches("^[0-9]+$"));
@ -1095,7 +1095,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaTest {
assertEquals(OperationOutcome.class, resp.getEntry().get(0).getResource().getClass());
OperationOutcome outcome = (OperationOutcome) resp.getEntry().get(0).getResource();
assertThat(outcome.getIssue().get(1).getDetails(), containsString("Placeholder resource ID \"urn:oid:0.1.2.3\" was replaced with permanent ID \"Patient/"));
assertThat(outcome.getIssue().get(1).getDiagnostics(), containsString("Placeholder resource ID \"urn:oid:0.1.2.3\" was replaced with permanent ID \"Patient/"));
assertTrue(resp.getEntry().get(1).getResponse().getLocation(), new IdDt(resp.getEntry().get(1).getResponse().getLocation()).getIdPart().matches("^[0-9]+$"));
assertTrue(resp.getEntry().get(2).getResponse().getLocation(), new IdDt(resp.getEntry().get(2).getResponse().getLocation()).getIdPart().matches("^[0-9]+$"));

View File

@ -1,8 +1,22 @@
package ca.uhn.fhir.jpa.provider;
import static org.apache.commons.lang3.StringUtils.*;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.containsInRelativeOrder;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.hasItems;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.startsWith;
import static org.hamcrest.Matchers.stringContainsInOrder;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.BufferedReader;
import java.io.IOException;
@ -37,14 +51,12 @@ import org.hl7.fhir.instance.model.api.IIdType;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.theories.suppliers.TestedOn;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.jpa.dao.BaseJpaTest;
import ca.uhn.fhir.jpa.dao.DaoConfig;
import ca.uhn.fhir.jpa.dao.IFhirResourceDao;
import ca.uhn.fhir.jpa.dao.SearchParameterMap;
import ca.uhn.fhir.jpa.testutil.RandomServerPortProvider;
import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.BundleEntry;
@ -70,7 +82,7 @@ import ca.uhn.fhir.model.dstu2.resource.Organization;
import ca.uhn.fhir.model.dstu2.resource.Parameters;
import ca.uhn.fhir.model.dstu2.resource.Patient;
import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
import ca.uhn.fhir.model.dstu2.resource.QuestionnaireAnswers;
import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
import ca.uhn.fhir.model.dstu2.resource.ValueSet;
import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum;
import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
@ -86,7 +98,6 @@ import ca.uhn.fhir.model.valueset.BundleEntrySearchModeEnum;
import ca.uhn.fhir.model.valueset.BundleTypeEnum;
import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator;
import ca.uhn.fhir.rest.api.MethodOutcome;
import ca.uhn.fhir.rest.api.SortSpec;
import ca.uhn.fhir.rest.client.IGenericClient;
import ca.uhn.fhir.rest.client.ServerValidationModeEnum;
import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor;
@ -94,7 +105,6 @@ import ca.uhn.fhir.rest.gclient.IQuery;
import ca.uhn.fhir.rest.gclient.StringClientParam;
import ca.uhn.fhir.rest.gclient.TokenClientParam;
import ca.uhn.fhir.rest.param.DateRangeParam;
import ca.uhn.fhir.rest.param.TokenParam;
import ca.uhn.fhir.rest.server.Constants;
import ca.uhn.fhir.rest.server.FifoMemoryPagingProvider;
import ca.uhn.fhir.rest.server.IResourceProvider;
@ -417,8 +427,8 @@ public class ResourceProviderDstu2Test extends BaseJpaTest {
}
@Test
public void testCreateQuestionnaireAnswersWithValidation() throws IOException {
String methodName = "testCreateQuestionnaireAnswersWithValidation";
public void testCreateQuestionnaireResponseWithValidation() throws IOException {
String methodName = "testCreateQuestionnaireResponseWithValidation";
ValueSet options = new ValueSet();
options.getCodeSystem().setSystem("urn:system").addConcept().setCode("code0");
@ -428,18 +438,18 @@ public class ResourceProviderDstu2Test extends BaseJpaTest {
q.getGroup().addQuestion().setLinkId("link0").setRequired(false).setType(AnswerFormatEnum.CHOICE).setOptions(new ResourceReferenceDt(optId));
IIdType qId = ourClient.create().resource(q).execute().getId();
QuestionnaireAnswers qa;
QuestionnaireResponse qa;
// Good code
qa = new QuestionnaireAnswers();
qa = new QuestionnaireResponse();
qa.getQuestionnaire().setReference(qId.toUnqualifiedVersionless().getValue());
qa.getGroup().addQuestion().setLinkId("link0").addAnswer().setValue(new CodingDt().setSystem("urn:system").setCode("code0"));
ourClient.create().resource(qa).execute();
// Bad code
qa = new QuestionnaireAnswers();
qa = new QuestionnaireResponse();
qa.getQuestionnaire().setReference(qId.toUnqualifiedVersionless().getValue());
qa.getGroup().addQuestion().setLinkId("link0").addAnswer().setValue(new CodingDt().setSystem("urn:system").setCode("code1"));
try {

View File

@ -180,109 +180,122 @@
<version>1.2-SNAPSHOT</version>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>generate-structures</goal>
</goals>
<configuration>
<baseResourceNames>
<baseResourceName>supplyrequest</baseResourceName>
<baseResourceName>supplydelivery</baseResourceName>
<baseResourceName>clinicalimpression</baseResourceName>
<baseResourceName>familymemberhistory</baseResourceName>
<baseResourceName>flag</baseResourceName>
<baseResourceName>processresponse</baseResourceName>
<baseResourceName>Condition</baseResourceName>
<baseResourceName>DeviceComponent</baseResourceName>
<baseResourceName>Communication</baseResourceName>
<baseResourceName>Group</baseResourceName>
<baseResourceName>ValueSet</baseResourceName>
<baseResourceName>Coverage</baseResourceName>
<baseResourceName>Appointment</baseResourceName>
<baseResourceName>Slot</baseResourceName>
<baseResourceName>Contraindication</baseResourceName>
<baseResourceName>Composition</baseResourceName>
<baseResourceName>EpisodeOfCare</baseResourceName>
<baseResourceName>Conformance</baseResourceName>
<baseResourceName>NamingSystem</baseResourceName>
<baseResourceName>HealthcareService</baseResourceName>
<baseResourceName>OrderResponse</baseResourceName>
<baseResourceName>ConceptMap</baseResourceName>
<baseResourceName>Practitioner</baseResourceName>
<baseResourceName>CarePlan</baseResourceName>
<baseResourceName>Substance</baseResourceName>
<baseResourceName>DeviceUseRequest</baseResourceName>
<baseResourceName>Schedule</baseResourceName>
<baseResourceName>EligibilityRequest</baseResourceName>
<baseResourceName>QuestionnaireResponse</baseResourceName>
<baseResourceName>PaymentReconciliation</baseResourceName>
<baseResourceName>ImagingObjectSelection</baseResourceName>
<baseResourceName>OperationDefinition</baseResourceName>
<baseResourceName>ClaimResponse</baseResourceName>
<baseResourceName>BodySite</baseResourceName>
<baseResourceName>CommunicationRequest</baseResourceName>
<baseResourceName>RiskAssessment</baseResourceName>
<baseResourceName>Observation</baseResourceName>
<baseResourceName>AllergyIntolerance</baseResourceName>
<baseResourceName>ExplanationOfBenefit</baseResourceName>
<baseResourceName>RelatedPerson</baseResourceName>
<baseResourceName>AuditEvent</baseResourceName>
<baseResourceName>EligibilityResponse</baseResourceName>
<baseResourceName>Person</baseResourceName>
<baseResourceName>ProcedureRequest</baseResourceName>
<baseResourceName>ProcessRequest</baseResourceName>
<baseResourceName>Claim</baseResourceName>
<baseResourceName>DeviceMetric</baseResourceName>
<baseResourceName>Organization</baseResourceName>
<baseResourceName>ImmunizationRecommendation</baseResourceName>
<baseResourceName>MedicationDispense</baseResourceName>
<baseResourceName>MedicationPrescription</baseResourceName>
<baseResourceName>PaymentNotice</baseResourceName>
<baseResourceName>MedicationStatement</baseResourceName>
<baseResourceName>AppointmentResponse</baseResourceName>
<baseResourceName>Questionnaire</baseResourceName>
<baseResourceName>OperationOutcome</baseResourceName>
<baseResourceName>Media</baseResourceName>
<baseResourceName>Binary</baseResourceName>
<baseResourceName>VisionPrescription</baseResourceName>
<baseResourceName>DocumentReference</baseResourceName>
<baseResourceName>Immunization</baseResourceName>
<baseResourceName>Bundle</baseResourceName>
<baseResourceName>Subscription</baseResourceName>
<baseResourceName>ImagingStudy</baseResourceName>
<baseResourceName>Provenance</baseResourceName>
<baseResourceName>Device</baseResourceName>
<baseResourceName>StructureDefinition</baseResourceName>
<baseResourceName>Order</baseResourceName>
<baseResourceName>Procedure</baseResourceName>
<baseResourceName>DiagnosticReport</baseResourceName>
<baseResourceName>Medication</baseResourceName>
<baseResourceName>MessageHeader</baseResourceName>
<baseResourceName>DataElement</baseResourceName>
<baseResourceName>DocumentManifest</baseResourceName>
<baseResourceName>MedicationAdministration</baseResourceName>
<baseResourceName>Encounter</baseResourceName>
<baseResourceName>List</baseResourceName>
<baseResourceName>DeviceUseStatement</baseResourceName>
<baseResourceName>Goal</baseResourceName>
<baseResourceName>NutritionOrder</baseResourceName>
<baseResourceName>SearchParameter</baseResourceName>
<baseResourceName>ReferralRequest</baseResourceName>
<baseResourceName>EnrollmentRequest</baseResourceName>
<baseResourceName>Location</baseResourceName>
<baseResourceName>Contract</baseResourceName>
<baseResourceName>Basic</baseResourceName>
<baseResourceName>Specimen</baseResourceName>
<baseResourceName>EnrollmentResponse</baseResourceName>
<baseResourceName>Patient</baseResourceName>
<baseResourceName>DiagnosticOrder</baseResourceName>
<baseResourceName>Parameters</baseResourceName>
</baseResourceNames>
<package>ca.uhn.fhir.model.dstu2</package>
<version>dstu2</version>
<buildDatatypes>true</buildDatatypes>
</configuration>
</execution>
<!--
<execution>
<id>clean_source</id>
<goals>
<goal>minimize-resources</goal>
</goals>
<configuration>
<fhirVersion>DSTU2</fhirVersion>
<targetDirectory>${project.baseDir}/../hapi-tinder-plugin/</targetDirectory>
</configuration>
</execution>
-->
</executions>
<configuration>
<package>ca.uhn.fhir.model.dstu2</package>
<version>dstu2</version>
<baseResourceNames>
<baseResourceName>clinicalimpression</baseResourceName>
<baseResourceName>familymemberhistory</baseResourceName>
<baseResourceName>flag</baseResourceName>
<baseResourceName>processresponse</baseResourceName>
<baseResourceName>Condition</baseResourceName>
<baseResourceName>Supply</baseResourceName>
<baseResourceName>DeviceComponent</baseResourceName>
<baseResourceName>Communication</baseResourceName>
<baseResourceName>Group</baseResourceName>
<baseResourceName>ValueSet</baseResourceName>
<baseResourceName>Coverage</baseResourceName>
<baseResourceName>Appointment</baseResourceName>
<baseResourceName>Slot</baseResourceName>
<baseResourceName>Contraindication</baseResourceName>
<baseResourceName>Composition</baseResourceName>
<baseResourceName>EpisodeOfCare</baseResourceName>
<baseResourceName>Conformance</baseResourceName>
<baseResourceName>NamingSystem</baseResourceName>
<baseResourceName>HealthcareService</baseResourceName>
<baseResourceName>OrderResponse</baseResourceName>
<baseResourceName>ConceptMap</baseResourceName>
<baseResourceName>Practitioner</baseResourceName>
<baseResourceName>CarePlan</baseResourceName>
<baseResourceName>Substance</baseResourceName>
<baseResourceName>DeviceUseRequest</baseResourceName>
<baseResourceName>Schedule</baseResourceName>
<baseResourceName>EligibilityRequest</baseResourceName>
<baseResourceName>QuestionnaireAnswers</baseResourceName>
<baseResourceName>PaymentReconciliation</baseResourceName>
<baseResourceName>ImagingObjectSelection</baseResourceName>
<baseResourceName>OperationDefinition</baseResourceName>
<baseResourceName>ClaimResponse</baseResourceName>
<baseResourceName>BodySite</baseResourceName>
<baseResourceName>CommunicationRequest</baseResourceName>
<baseResourceName>RiskAssessment</baseResourceName>
<baseResourceName>Observation</baseResourceName>
<baseResourceName>AllergyIntolerance</baseResourceName>
<baseResourceName>ExplanationOfBenefit</baseResourceName>
<baseResourceName>RelatedPerson</baseResourceName>
<baseResourceName>AuditEvent</baseResourceName>
<baseResourceName>EligibilityResponse</baseResourceName>
<baseResourceName>Person</baseResourceName>
<baseResourceName>ProcedureRequest</baseResourceName>
<baseResourceName>ProcessRequest</baseResourceName>
<baseResourceName>Claim</baseResourceName>
<baseResourceName>DeviceMetric</baseResourceName>
<baseResourceName>Organization</baseResourceName>
<baseResourceName>ImmunizationRecommendation</baseResourceName>
<baseResourceName>MedicationDispense</baseResourceName>
<baseResourceName>MedicationPrescription</baseResourceName>
<baseResourceName>PaymentNotice</baseResourceName>
<baseResourceName>MedicationStatement</baseResourceName>
<baseResourceName>AppointmentResponse</baseResourceName>
<baseResourceName>Questionnaire</baseResourceName>
<baseResourceName>OperationOutcome</baseResourceName>
<baseResourceName>Media</baseResourceName>
<baseResourceName>Binary</baseResourceName>
<baseResourceName>VisionPrescription</baseResourceName>
<baseResourceName>DocumentReference</baseResourceName>
<baseResourceName>Immunization</baseResourceName>
<baseResourceName>Bundle</baseResourceName>
<baseResourceName>Subscription</baseResourceName>
<baseResourceName>ImagingStudy</baseResourceName>
<baseResourceName>Provenance</baseResourceName>
<baseResourceName>Device</baseResourceName>
<baseResourceName>StructureDefinition</baseResourceName>
<baseResourceName>Order</baseResourceName>
<baseResourceName>Procedure</baseResourceName>
<baseResourceName>DiagnosticReport</baseResourceName>
<baseResourceName>Medication</baseResourceName>
<baseResourceName>MessageHeader</baseResourceName>
<baseResourceName>DataElement</baseResourceName>
<baseResourceName>DocumentManifest</baseResourceName>
<baseResourceName>MedicationAdministration</baseResourceName>
<baseResourceName>Encounter</baseResourceName>
<baseResourceName>List</baseResourceName>
<baseResourceName>DeviceUseStatement</baseResourceName>
<baseResourceName>Goal</baseResourceName>
<baseResourceName>NutritionOrder</baseResourceName>
<baseResourceName>SearchParameter</baseResourceName>
<baseResourceName>ReferralRequest</baseResourceName>
<baseResourceName>EnrollmentRequest</baseResourceName>
<baseResourceName>Location</baseResourceName>
<baseResourceName>Contract</baseResourceName>
<baseResourceName>Basic</baseResourceName>
<baseResourceName>Specimen</baseResourceName>
<baseResourceName>EnrollmentResponse</baseResourceName>
<baseResourceName>Patient</baseResourceName>
<baseResourceName>CarePlan2</baseResourceName>
<baseResourceName>DiagnosticOrder</baseResourceName>
<baseResourceName>Parameters</baseResourceName>
</baseResourceNames>
<buildDatatypes>true</buildDatatypes>
</configuration>
</plugin>
</plugins>
<pluginManagement>

View File

@ -162,10 +162,11 @@ public class ServerConformanceProvider implements IServerConformanceProvider<Con
retVal.setPublisher(myPublisher);
retVal.setDate(DateTimeDt.withCurrentTime());
retVal.setFhirVersion("0.5.0"); // TODO: pull from model
retVal.setAcceptUnknown(false); // TODO: make this configurable - this is a fairly big effort since the parser
retVal.setAcceptUnknown("extensions"); // TODO: make this configurable - this is a fairly big effort since the parser
// needs to be modified to actually allow it
retVal.getImplementation().setDescription(myRestfulServer.getImplementationDescription());
retVal.setKind("instance");
retVal.getSoftware().setName(myRestfulServer.getServerName());
retVal.getSoftware().setVersion(myRestfulServer.getServerVersion());
retVal.addFormat(Constants.CT_FHIR_XML);

View File

@ -57,9 +57,15 @@
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Composition/f:section">
<sch:assert test="(exists(f:content) and not(exists(f:section))) or (exists(f:section) and not(exists(f:content)))">cmp-1: A section must have either subsections or content</sch:assert>
<sch:assert test="exists(f:text) or exists(f:entry) or exists(f:section)">cmp-1: A section must at least one of text, entries, or sub-sections</sch:assert>
<sch:assert test="not(exists(f:emptyReason) and exists(f:entry))">cmp-2: A section can only have an emptyReason if it is empty</sch:assert>
</sch:rule>
<sch:rule context="f:Composition/f:section/f:content">
<sch:rule context="f:Composition/f:section/f:text/f:div">
<sch:assert test="not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="f:Composition/f:section/f:entry">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>

View File

@ -88,20 +88,5 @@
<sch:rule context="f:Condition/f:evidence/f:detail">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Condition/f:location/f:siteReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Condition/f:dueTo">
<sch:assert test="exists(f:code) != exists(f:target)">con-4: Relationship SHALL have either a code or a target</sch:assert>
</sch:rule>
<sch:rule context="f:Condition/f:dueTo/f:target">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Condition/f:occurredFollowing">
<sch:assert test="exists(f:code) != exists(f:target)">con-5: Relationship SHALL have either a code or a target</sch:assert>
</sch:rule>
<sch:rule context="f:Condition/f:occurredFollowing/f:target">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -32,10 +32,10 @@
<sch:rule context="f:Conformance">
<sch:assert test="count(f:rest)=count(distinct-values(f:rest/f:mode/@value))">cnf-8: There can only be one REST declaration per mode</sch:assert>
<sch:assert test="count(f:document[f:mode='producer'])=count(distinct-values(f:document[f:mode='producer']/f:profile/@value)) and count(f:document[f:mode='consumer'])=count(distinct-values(f:document[f:mode='consumer']/f:profile/@value))">cnf-7: The set of documents must be unique by the combination of profile &amp; mode</sch:assert>
<sch:assert test="count(f:messaging)&lt;=1 or not(f:messaging[not(f:endpoint)])">cnf-4: If there is more than one messaging element, endpoint must be specified for each one</sch:assert>
<sch:assert test="count(f:messaging/f:endpoint)=count(distinct-values(f:messaging/f:endpoint/@value))">cnf-5: The set of end points listed for messaging must be unique</sch:assert>
<sch:assert test="count(f:software | f:implementation | f:description) &gt; 0">cnf-2: A Conformance statement SHALL have at least one of description, software, or implementation</sch:assert>
<sch:assert test="exists(f:rest) or exists(f:messaging) or exists(f:document)">cnf-1: A Conformance statement SHALL have at least one of rest, messaging or document</sch:assert>
<sch:assert test="not(exists(f:software) or exists(f:implementation)) or (f:kind/@value != 'requirements')">cnf-14: Conformance statements of kind 'requirements' do not have software or implementation elements</sch:assert>
<sch:assert test="not(exists(f:implementation)) or (f:kind/@value != 'capability')">cnf-15: Conformance statements of kind 'software' do not have implementation elements</sch:assert>
</sch:rule>
<sch:rule context="f:Conformance/f:contact/f:telecom">
<sch:assert test="not(exists(f:value)) or exists(f:system)">cpt-2: A system is required if a value is provided.</sch:assert>
@ -57,12 +57,14 @@
<sch:rule context="f:Conformance/f:rest/f:resource/f:profile">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Conformance/f:rest/f:resource/f:searchParam">
<sch:assert test="not(exists(f:chain)) or (f:type/@value = 'reference')">cnf-13: Search parameters can only have chain names when the search parameter type is 'reference'</sch:assert>
</sch:rule>
<sch:rule context="f:Conformance/f:rest/f:operation/f:definition">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Conformance/f:messaging">
<sch:assert test="count(f:event[f:mode='sender'])=count(distinct-values(f:event[f:mode='sender']/f:code/@value)) and count(f:event[f:mode='receiver'])=count(distinct-values(f:event[f:mode='receiver']/f:code/@value))">cnf-6: The set of events per messaging endpoint must be unique by the combination of code &amp; mode</sch:assert>
<sch:assert test="exists(f:endpoint) = exists(parent::f:Conformance/f:implementation)">cnf-3: Messaging end point is required (and is only permitted) when statement is for an implementation</sch:assert>
<sch:assert test="exists(f:endpoint) = (f:kind/@value = 'implementation')">cnf-3: Messaging end point is required (and is only permitted) when statement is for an implementation</sch:assert>
</sch:rule>
<sch:rule context="f:Conformance/f:messaging/f:event/f:request">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>

View File

@ -43,6 +43,7 @@
</sch:rule>
<sch:rule context="f:DataElement/f:element">
<sch:assert test="not(exists(f:base))">dae-1: No base allowed</sch:assert>
<sch:assert test="not(exists(f:slicing))">dae-2: No slicing allowed</sch:assert>
</sch:rule>
<sch:rule context="f:DataElement/f:element">
<sch:assert test="(not(f:max/@value) and not(f:min/@value)) or (f:max/@value = '*') or (f:max/@value &gt;= f:min/@value)">eld-2: Min &lt;= Max</sch:assert>

View File

@ -56,7 +56,7 @@
<sch:rule context="f:DiagnosticOrder/f:item/f:specimen">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:DiagnosticOrder/f:item/f:bodySiteReference">
<sch:rule context="f:DiagnosticOrder/f:note/f:authorReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>

View File

@ -29,27 +29,27 @@
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="f:DiagnosticReport/f:subject">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:DiagnosticReport/f:performer">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:DiagnosticReport/f:encounter">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:DiagnosticReport/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:DiagnosticReport/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:DiagnosticReport/f:requestDetail">
<sch:rule context="f:DiagnosticReport/f:subject">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:DiagnosticReport/f:encounter">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:DiagnosticReport/f:effectivePeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:DiagnosticReport/f:performer">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:DiagnosticReport/f:requestDetail">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:DiagnosticReport/f:specimen">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>

View File

@ -41,6 +41,9 @@
<sch:rule context="f:Flag/f:subject">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Flag/f:encounter">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Flag/f:author">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>

View File

@ -31,7 +31,6 @@
</sch:rule>
<sch:rule context="f:Group">
<sch:assert test="f:actual/@value='true' or not(exists(f:member))">grp-1: Can only have members if group is &quot;actual&quot;</sch:assert>
<sch:assert test="not(f:quantity) or not(f:member) or not(f:quantity&gt;count(f:member))">grp-4: Can't have more members associated with the group than the value specified for &quot;quantity&quot;</sch:assert>
</sch:rule>
<sch:rule context="f:Group/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
@ -52,11 +51,14 @@
<sch:rule context="f:Group/f:characteristic/f:valueRange/f:high">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="f:Group/f:member">
<sch:assert test="lower-case(f:type/@value)=parent::f:Group/f:type/@value or (f:type/@value='Patient' and parent::f:Group/f:type/@value=('animal','person'))">grp-3: Member resource types SHALL agree with group type</sch:assert>
<sch:rule context="f:Group/f:characteristic/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:Group/f:member">
<sch:rule context="f:Group/f:member/f:entity">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Group/f:member/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -35,5 +35,8 @@
<sch:rule context="f:ImagingObjectSelection/f:author">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:ImagingObjectSelection/f:study/f:imagingStudy">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -35,13 +35,13 @@
<sch:rule context="f:ImplementationGuide/f:contact/f:telecom/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:ImplementationGuide/f:package/f:item/f:content">
<sch:rule context="f:ImplementationGuide/f:package/f:resource/f:sourceReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:ImplementationGuide/f:package/f:item/f:example/f:target">
<sch:rule context="f:ImplementationGuide/f:package/f:resource/f:exampleFor">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:ImplementationGuide/f:default/f:profile">
<sch:rule context="f:ImplementationGuide/f:global/f:profile">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>

View File

@ -34,15 +34,15 @@
<sch:assert test="not(f:replacedBy) or f:status/@value='retired'">nsd-3: Can only have replacedBy if namingsystem is retired</sch:assert>
<sch:assert test="not(exists(for $type in distinct-values(f:uniqueId/f:type) return if (count(f:uniqueId[f:type/@value=$type and f:primary/@value='true'])&gt;1) then $type else ()))">nsd-2: Can't have more than one preferred identifier for a type</sch:assert>
</sch:rule>
<sch:rule context="f:NamingSystem/f:uniqueId/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:NamingSystem/f:contact/f:telecom">
<sch:assert test="not(exists(f:value)) or exists(f:system)">cpt-2: A system is required if a value is provided.</sch:assert>
</sch:rule>
<sch:rule context="f:NamingSystem/f:contact/f:telecom/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:NamingSystem/f:uniqueId/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:NamingSystem/f:replacedBy">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>

View File

@ -33,6 +33,24 @@
<sch:assert test="f:code/@value != f:component.code/@value">obs-7: Component code Shall not be same as observation code</sch:assert>
<sch:assert test="not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))">obs-6: Shall only be present if Observation.value[x] is not present</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:subject">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:encounter">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:effectivePeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:performer">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:valueQuantity">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
@ -64,33 +82,12 @@
<sch:rule context="f:Observation/f:valuePeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:effectivePeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:bodySiteReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:subject">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:specimen">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:performer">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:device">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:encounter">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Observation/f:referenceRange">
<sch:assert test="(exists(f:low) or exists(f:high)or exists(f:text))">obs-3: Must have at least a low or a high or text</sch:assert>
</sch:rule>

View File

@ -3,7 +3,7 @@
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource QuestionnaireAnswers
This file contains just the constraints for the resource QuestionnaireResponse
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
@ -17,52 +17,52 @@
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>QuestionnaireAnswers</sch:title>
<sch:rule context="f:QuestionnaireAnswers">
<sch:title>QuestionnaireResponse</sch:title>
<sch:rule context="f:QuestionnaireResponse">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(parent::f:contained and f:text)">dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative</sch:assert>
<sch:assert test="not(exists(f:contained/f:meta/f:versionId)) and not(exists(f:contained/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource</sch:assert>
</sch:rule>
<sch:rule context="f:QuestionnaireAnswers/f:text/f:div">
<sch:rule context="f:QuestionnaireResponse/f:text/f:div">
<sch:assert test="not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="f:QuestionnaireAnswers/f:identifier/f:period">
<sch:rule context="f:QuestionnaireResponse/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:QuestionnaireAnswers/f:identifier/f:assigner">
<sch:rule context="f:QuestionnaireResponse/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:QuestionnaireAnswers/f:questionnaire">
<sch:rule context="f:QuestionnaireResponse/f:questionnaire">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:QuestionnaireAnswers/f:subject">
<sch:rule context="f:QuestionnaireResponse/f:subject">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:QuestionnaireAnswers/f:author">
<sch:rule context="f:QuestionnaireResponse/f:author">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:QuestionnaireAnswers/f:source">
<sch:rule context="f:QuestionnaireResponse/f:source">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:QuestionnaireAnswers/f:encounter">
<sch:rule context="f:QuestionnaireResponse/f:encounter">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:QuestionnaireAnswers/f:group">
<sch:assert test="not(exists(f:group) and exists(f:question))">qan-1: Groups may either contain questions or groups but not both</sch:assert>
<sch:rule context="f:QuestionnaireResponse/f:group">
<sch:assert test="not(exists(f:group) and exists(f:question))">qrs-1: Groups may either contain questions or groups but not both</sch:assert>
</sch:rule>
<sch:rule context="f:QuestionnaireAnswers/f:group/f:subject">
<sch:rule context="f:QuestionnaireResponse/f:group/f:subject">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:QuestionnaireAnswers/f:group/f:question/f:answer/f:valueAttachment">
<sch:rule context="f:QuestionnaireResponse/f:group/f:question/f:answer/f:valueAttachment">
<sch:assert test="not(exists(f:data)) or exists(f:contentType)">att-1: It the Attachment has data, it SHALL have a contentType</sch:assert>
</sch:rule>
<sch:rule context="f:QuestionnaireAnswers/f:group/f:question/f:answer/f:valueQuantity">
<sch:rule context="f:QuestionnaireResponse/f:group/f:question/f:answer/f:valueQuantity">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="f:QuestionnaireAnswers/f:group/f:question/f:answer/f:valueReference">
<sch:rule context="f:QuestionnaireResponse/f:group/f:question/f:answer/f:valueReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>

View File

@ -56,9 +56,6 @@
<sch:rule context="f:Specimen/f:collection/f:quantity">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="f:Specimen/f:collection/f:bodySiteReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="f:Specimen/f:treatment/f:additive">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>

View File

@ -33,6 +33,12 @@
<sch:assert test="not(f:assert)">inv-16: Assertions SHALL be present in TestScript.setup.action and TestScript.test.action only.</sch:assert>
<sch:assert test="not(f:operation)">inv-15: Operations SHALL be present in TestScript.setup.action, TestScript.test.action and TestScript.teardown.action only.</sch:assert>
</sch:rule>
<sch:rule context="f:TestScript/f:contact/f:telecom">
<sch:assert test="not(exists(f:value)) or exists(f:system)">cpt-2: A system is required if a value is provided.</sch:assert>
</sch:rule>
<sch:rule context="f:TestScript/f:contact/f:telecom/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:TestScript/f:metadata">
<sch:assert test="f:capabilities/f:required or f:capabilities/f:validated or (f:capabilities/f:required and f:capabilities/f:validated)">inv-5: TestScript metadata capabilities SHALL contain required or validated or both.</sch:assert>
</sch:rule>

View File

@ -32,7 +32,7 @@
<sch:rule context="f:ValueSet">
<sch:assert test="not(f:define/f:system/@value = f:identifier/@value)">vsd-7: A defined code system (if present) SHALL have a different identifier to the value set itself</sch:assert>
<sch:assert test="not(exists(f:compose)) or (count(f:compose/f:import)!=1 or exists(f:compose/f:include) or exists(f:compose/f:exclude) or exists(f:define))">vsd-2: A value set with only one import SHALL also have an include and/or an exclude unless the value set defines its own codes</sch:assert>
<sch:assert test="exists(f:define) or exists(f:compose) or exists(f:expansion)">vsd-5: Value set SHALL contain either a define, a compose, or an expansion element</sch:assert>
<sch:assert test="exists(f:define) or exists(f:compose) or exists(f:expansion)">vsd-5: Value set SHALL contain at least one of a define, a compose, or an expansion element</sch:assert>
</sch:rule>
<sch:rule context="f:ValueSet/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>

View File

@ -14,10 +14,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import net.sf.json.JSON;
import net.sf.json.JSONSerializer;
import net.sf.json.JsonConfig;
import org.apache.commons.io.IOUtils;
import org.hamcrest.Matchers;
import org.junit.Assert;
@ -43,17 +39,19 @@ import ca.uhn.fhir.model.dstu2.resource.Medication;
import ca.uhn.fhir.model.dstu2.resource.MedicationPrescription;
import ca.uhn.fhir.model.dstu2.resource.Observation;
import ca.uhn.fhir.model.dstu2.resource.Patient;
import ca.uhn.fhir.model.dstu2.resource.QuestionnaireAnswers;
import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum;
import ca.uhn.fhir.model.dstu2.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu2.valueset.ObservationReliabilityEnum;
import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
import ca.uhn.fhir.model.primitive.DateDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.model.primitive.StringDt;
import net.sf.json.JSON;
import net.sf.json.JSONSerializer;
import net.sf.json.JsonConfig;
public class JsonParserDstu2Test {
private static final FhirContext ourCtx = FhirContext.forDstu2();
@ -402,7 +400,7 @@ public class JsonParserDstu2Test {
@Test
public void testJsonPrimitiveWithExtensionEncoding() {
QuestionnaireAnswers parsed = new QuestionnaireAnswers();
QuestionnaireResponse parsed = new QuestionnaireResponse();
parsed.getGroup().setLinkId("value123");
parsed.getGroup().getLinkIdElement().addUndeclaredExtension(false, "http://123", new StringDt("HELLO"));
@ -849,7 +847,6 @@ public class JsonParserDstu2Test {
obsv.getCode().addCoding().setCode("name");
obsv.setValue(new StringDt("value test"));
obsv.setStatus(ObservationStatusEnum.FINAL);
obsv.setReliability(ObservationReliabilityEnum.OK);
obsv.addIdentifier().setSystem("System").setValue("id value");
DiagnosticReport report = new DiagnosticReport();
@ -872,7 +869,6 @@ public class JsonParserDstu2Test {
obsv.getCode().addCoding().setCode("name");
obsv.setValue(new StringDt("value test"));
obsv.setStatus(ObservationStatusEnum.FINAL);
obsv.setReliability(ObservationReliabilityEnum.OK);
obsv.addIdentifier().setSystem("System").setValue("id value");
DiagnosticReport report = new DiagnosticReport();

View File

@ -1,7 +1,16 @@
package ca.uhn.fhir.parser;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.emptyOrNullString;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.stringContainsInOrder;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.io.StringReader;
import java.util.ArrayList;
@ -122,14 +131,14 @@ public class XmlParserDstu2Test {
public void testDuration() {
Encounter enc = new Encounter();
DurationDt duration = new DurationDt();
duration.setUnits("day").setValue(123L);
duration.setUnit("day").setValue(123L);
enc.setLength(duration);
String str = ourCtx.newXmlParser().encodeResourceToString(enc);
ourLog.info(str);
assertThat(str, not(containsString("meta")));
assertThat(str, containsString("<length><value value=\"123\"/><units value=\"day\"/></length>"));
assertThat(str, containsString("<length><value value=\"123\"/><unit value=\"day\"/></length>"));
}
@Test
@ -494,9 +503,9 @@ public class XmlParserDstu2Test {
@Test
public void testEncodeAndReEncodeContainedJson() {
Composition comp = new Composition();
comp.addSection().getContent().setResource(new AllergyIntolerance().setComment("Section0_Allergy0"));
comp.addSection().getContent().setResource(new AllergyIntolerance().setComment("Section1_Allergy0"));
comp.addSection().getContent().setResource(new AllergyIntolerance().setComment("Section2_Allergy0"));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setComment("Section0_Allergy0"));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setComment("Section1_Allergy0"));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setComment("Section2_Allergy0"));
IParser parser = ourCtx.newJsonParser().setPrettyPrint(true);
@ -519,9 +528,9 @@ public class XmlParserDstu2Test {
@Test
public void testEncodeAndReEncodeContainedXml() {
Composition comp = new Composition();
comp.addSection().getContent().setResource(new AllergyIntolerance().setComment("Section0_Allergy0"));
comp.addSection().getContent().setResource(new AllergyIntolerance().setComment("Section1_Allergy0"));
comp.addSection().getContent().setResource(new AllergyIntolerance().setComment("Section2_Allergy0"));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setComment("Section0_Allergy0"));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setComment("Section1_Allergy0"));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setComment("Section2_Allergy0"));
IParser parser = ourCtx.newXmlParser().setPrettyPrint(true);
@ -985,8 +994,8 @@ public class XmlParserDstu2Test {
"<id value=\"2179414\"/>"+
"<url value=\"2179414\"/>"+
"<version value=\"1.0\"/>"+
"<description value=\"All codes representing the gender of a person.\"/>"+
"<status value=\"active\"/>"+
"<description value=\"All codes representing the gender of a person.\"/>"+
"<compose>"+
"<include>"+
"<system value=\"http://ncit.nci.nih.gov\"/>"+
@ -1077,6 +1086,8 @@ public class XmlParserDstu2Test {
"</identifier>"+
"<version value=\"1.0\"/>"+
"<name value=\"Gender Code\"/>"+
"<status value=\"active\"/>"+
"<publisher value=\"DCP\"/>"+
"<useContext>"+
"<coding>"+
"<system value=\"http://example.org/FBPP\"/>"+
@ -1143,8 +1154,6 @@ public class XmlParserDstu2Test {
"<display value=\"Sulindac for Breast\"/>"+
"</coding>"+
"</useContext>"+
"<status value=\"active\"/>"+
"<publisher value=\"DCP\"/>"+
"<element>"+
"<extension url=\"http://hl7.org/fhir/StructureDefinition/minLength\">"+
"<valueInteger value=\"1\"/>"+

View File

@ -51,6 +51,7 @@ import ca.uhn.fhir.rest.method.SearchParameter;
import ca.uhn.fhir.rest.param.DateRangeParam;
import ca.uhn.fhir.rest.param.TokenOrListParam;
import ca.uhn.fhir.rest.server.provider.dstu2.ServerConformanceProvider;
import ca.uhn.fhir.validation.ValidationResult;
public class ServerConformanceProviderDstu2Test {
@ -437,7 +438,8 @@ public class ServerConformanceProviderDstu2Test {
Conformance conformance = sc.getServerConformance(createHttpServletRequest());
assertTrue(ourCtx.newValidator().validateWithResult(conformance).isSuccessful());
ValidationResult result = ourCtx.newValidator().validateWithResult(conformance);
assertTrue(result.getMessages().toString(), result.isSuccessful());
}
public static class ConditionalProvider implements IResourceProvider {

View File

@ -107,7 +107,7 @@ public class ResponseHighlightingInterceptorTest {
reqDetails.setServletRequest(req);
ResourceNotFoundException exception = new ResourceNotFoundException("Not found");
exception.setOperationOutcome(new OperationOutcome().addIssue(new Issue().setDetails("Hello")));
exception.setOperationOutcome(new OperationOutcome().addIssue(new Issue().setDiagnostics("Hello")));
assertFalse(ic.handleException(reqDetails, exception, req, resp));

View File

@ -10,11 +10,9 @@ import static org.junit.Assert.fail;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Locale;
import org.apache.commons.io.IOUtils;
import org.hamcrest.core.StringContains;
import org.hl7.fhir.instance.model.api.IBaseOperationOutcome;
import org.junit.Test;
import ca.uhn.fhir.context.FhirContext;
@ -27,7 +25,6 @@ import ca.uhn.fhir.model.dstu2.resource.Patient;
import ca.uhn.fhir.model.dstu2.valueset.ContactPointSystemEnum;
import ca.uhn.fhir.model.dstu2.valueset.UnitsOfTimeEnum;
import ca.uhn.fhir.model.primitive.DateDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
public class ResourceValidatorDstu2Test {
@ -182,7 +179,7 @@ public class ResourceValidatorDstu2Test {
OperationOutcome operationOutcome = (OperationOutcome) validationResult.getOperationOutcome();
ourLog.info(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(operationOutcome));
assertEquals(1, operationOutcome.getIssue().size());
assertThat(operationOutcome.getIssueFirstRep().getDetails(), containsString("cpt-2:"));
assertThat(operationOutcome.getIssueFirstRep().getDiagnostics(), containsString("cpt-2:"));
p.getTelecomFirstRep().setSystem(ContactPointSystemEnum.EMAIL);
validationResult = val.validateWithResult(p);

View File

@ -8,13 +8,13 @@ import java.util.List;
import org.hl7.fhir.instance.model.OperationOutcome.IssueSeverity;
import org.hl7.fhir.instance.model.Questionnaire;
import org.hl7.fhir.instance.model.QuestionnaireAnswers;
import org.hl7.fhir.instance.model.QuestionnaireResponse;
import org.hl7.fhir.instance.model.ValueSet;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.valuesets.IssueType;
import org.hl7.fhir.instance.utils.WorkerContext;
import org.hl7.fhir.instance.validation.QuestionnaireAnswersValidator;
import org.hl7.fhir.instance.validation.QuestionnaireResponseValidator;
import org.hl7.fhir.instance.validation.ValidationMessage;
import org.hl7.fhir.instance.validation.ValidationMessage.Source;
@ -23,17 +23,17 @@ import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
import ca.uhn.fhir.util.ResourceReferenceInfo;
public class FhirQuestionnaireAnswersValidator extends BaseValidatorBridge {
public class FhirQuestionnaireResponseValidator extends BaseValidatorBridge {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirQuestionnaireAnswersValidator.class);
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirQuestionnaireResponseValidator.class);
private IResourceLoader myResourceLoader;
/**
* Set the class which will be used to load linked resources from the <code>QuestionnaireAnswers</code>. Specifically, if the <code>QuestionnaireAnswers</code> refers to an external (non-contained)
* Set the class which will be used to load linked resources from the <code>QuestionnaireResponse</code>. Specifically, if the <code>QuestionnaireResponse</code> refers to an external (non-contained)
* <code>Questionnaire</code>, or to any external (non-contained) <code>ValueSet</code>, the resource loader will be used to fetch those resources during the validation.
*
* @param theResourceLoader
* The resourceloader to use. May be <code>null</code> if no resource loader should be used (in which case any <code>QuestionaireAnswers</code> with external references will fail to
* The resourceloader to use. May be <code>null</code> if no resource loader should be used (in which case any <code>QuestionaireResponse</code> with external references will fail to
* validate.)
*/
public void setResourceLoader(IResourceLoader theResourceLoader) {
@ -48,12 +48,12 @@ public class FhirQuestionnaireAnswersValidator extends BaseValidatorBridge {
return Collections.emptyList();
}
if (resource instanceof QuestionnaireAnswers) {
return doValidate(theCtx, (QuestionnaireAnswers) resource);
if (resource instanceof QuestionnaireResponse) {
return doValidate(theCtx, (QuestionnaireResponse) resource);
}
RuntimeResourceDefinition def = theCtx.getFhirContext().getResourceDefinition((IBaseResource) resource);
if ("QuestionnaireAnswers".equals(def.getName()) == false) {
if ("QuestionnaireResponse".equals(def.getName()) == false) {
return Collections.emptyList();
}
@ -63,12 +63,12 @@ public class FhirQuestionnaireAnswersValidator extends BaseValidatorBridge {
IParser p = theCtx.getFhirContext().newJsonParser();
String string = p.encodeResourceToString((IBaseResource) resource);
QuestionnaireAnswers qa = p.parseResource(QuestionnaireAnswers.class, string);
QuestionnaireResponse qa = p.parseResource(QuestionnaireResponse.class, string);
return doValidate(theCtx, qa);
}
private List<ValidationMessage> doValidate(IValidationContext<?> theValCtx, QuestionnaireAnswers theResource) {
private List<ValidationMessage> doValidate(IValidationContext<?> theValCtx, QuestionnaireResponse theResource) {
WorkerContext workerCtx = new WorkerContext();
ArrayList<ValidationMessage> retVal = new ArrayList<ValidationMessage>();
@ -77,7 +77,7 @@ public class FhirQuestionnaireAnswersValidator extends BaseValidatorBridge {
return retVal;
}
QuestionnaireAnswersValidator val = new QuestionnaireAnswersValidator(workerCtx);
QuestionnaireResponseValidator val = new QuestionnaireResponseValidator(workerCtx);
val.validate(retVal, theResource);
return retVal;
@ -92,7 +92,7 @@ public class FhirQuestionnaireAnswersValidator extends BaseValidatorBridge {
IIdType nextRef = nextRefInfo.getResourceReference().getReferenceElement();
String resourceType = nextRef.getResourceType();
if (isBlank(resourceType)) {
theMessages.add(new ValidationMessage(Source.QuestionnaireAnswersValidator, IssueType.INVALID, null, "Invalid reference '" + nextRef.getValue() + "' - Does not identify resource type", IssueSeverity.FATAL));
theMessages.add(new ValidationMessage(Source.QuestionnaireResponseValidator, org.hl7.fhir.instance.model.OperationOutcome.IssueType.INVALID, "Invalid reference '" + nextRef.getValue() + "' - Does not identify resource type", IssueSeverity.FATAL));
} else if ("ValueSet".equals(resourceType)) {
if (!theWorkerCtx.getValueSets().containsKey(nextRef.getValue())) {
ValueSet resource = tryToLoad(ValueSet.class, nextRef, theMessages);

View File

@ -406,4 +406,12 @@ public interface IFHIRClient {
* @return
*/
public <T extends Resource> Parameters operateType(Class<T> resourceClass, String name, Parameters params);
/**
* for debugging- the server address that the client is using
*
* @return
*/
public String getAddress();
}

View File

@ -44,10 +44,13 @@ import org.hl7.fhir.instance.model.Conformance.ConditionalDeleteStatus;
import org.hl7.fhir.instance.model.Conformance.ConformanceRestComponent;
import org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceComponent;
import org.hl7.fhir.instance.model.Conformance.ConformanceRestResourceSearchParamComponent;
import org.hl7.fhir.instance.model.Conformance.ConformanceStatementKind;
import org.hl7.fhir.instance.model.Conformance.ResourceInteractionComponent;
import org.hl7.fhir.instance.model.Conformance.RestfulConformanceMode;
import org.hl7.fhir.instance.model.Conformance.SystemRestfulInteraction;
import org.hl7.fhir.instance.model.Conformance.TypeRestfulInteraction;
import org.hl7.fhir.instance.model.Conformance.UnknownContentCode;
import org.hl7.fhir.instance.model.Enumerations.ConceptMapEquivalence;
import org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus;
import org.hl7.fhir.instance.model.Enumerations.ResourceType;
import org.hl7.fhir.instance.model.OperationDefinition;
@ -81,478 +84,484 @@ import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
* Server FHIR Provider which serves the conformance statement for a RESTful server implementation
*
* <p>
* Note: This class is safe to extend, but it is important to note that the same instance of {@link Conformance} is
* always returned unless {@link #setCache(boolean)} is called with a value of <code>false</code>. This means that if
* you are adding anything to the returned conformance instance on each call you should call
* <code>setCache(false)</code> in your provider constructor.
* Note: This class is safe to extend, but it is important to note that the same instance of {@link Conformance} is always returned unless
* {@link #setCache(boolean)} is called with a value of <code>false</code>. This means that if you are adding anything to the returned conformance instance on
* each call you should call <code>setCache(false)</code> in your provider constructor.
* </p>
*/
public class ServerConformanceProvider implements IServerConformanceProvider<Conformance> {
private boolean myCache = true;
private volatile Conformance myConformance;
private IdentityHashMap<OperationMethodBinding, String> myOperationBindingToName;
private HashMap<String, List<OperationMethodBinding>> myOperationNameToBindings;
private String myPublisher = "Not provided";
private final RestfulServer myRestfulServer;
private boolean myCache = true;
private volatile Conformance myConformance;
private IdentityHashMap<OperationMethodBinding, String> myOperationBindingToName;
private HashMap<String, List<OperationMethodBinding>> myOperationNameToBindings;
private String myPublisher = "Not provided";
private final RestfulServer myRestfulServer;
public ServerConformanceProvider(RestfulServer theRestfulServer) {
myRestfulServer = theRestfulServer;
}
public ServerConformanceProvider(RestfulServer theRestfulServer) {
myRestfulServer = theRestfulServer;
}
private void checkBindingForSystemOps(ConformanceRestComponent rest, Set<SystemRestfulInteraction> systemOps, BaseMethodBinding<?> nextMethodBinding) {
if (nextMethodBinding.getSystemOperationType() != null) {
String sysOpCode = nextMethodBinding.getSystemOperationType().getCode();
if (sysOpCode != null) {
SystemRestfulInteraction sysOp;
try {
sysOp = SystemRestfulInteraction.fromCode(sysOpCode);
} catch (Exception e) {
sysOp = null;
}
if (sysOp == null) {
throw new InternalErrorException("Unknown system-restful-interaction: " + sysOpCode);
}
if (systemOps.contains(sysOp) == false) {
systemOps.add(sysOp);
rest.addInteraction().setCode(sysOp);
}
}
}
}
private void checkBindingForSystemOps(ConformanceRestComponent rest, Set<SystemRestfulInteraction> systemOps,
BaseMethodBinding<?> nextMethodBinding) {
if (nextMethodBinding.getSystemOperationType() != null) {
String sysOpCode = nextMethodBinding.getSystemOperationType().getCode();
if (sysOpCode != null) {
SystemRestfulInteraction sysOp;
try {
sysOp = SystemRestfulInteraction.fromCode(sysOpCode);
} catch (Exception e) {
sysOp = null;
}
if (sysOp == null) {
throw new InternalErrorException("Unknown system-restful-interaction: " + sysOpCode);
}
if (systemOps.contains(sysOp) == false) {
systemOps.add(sysOp);
rest.addInteraction().setCode(sysOp);
}
}
}
}
private Map<String, List<BaseMethodBinding<?>>> collectMethodBindings() {
Map<String, List<BaseMethodBinding<?>>> resourceToMethods = new TreeMap<String, List<BaseMethodBinding<?>>>();
for (ResourceBinding next : myRestfulServer.getResourceBindings()) {
String resourceName = next.getResourceName();
for (BaseMethodBinding<?> nextMethodBinding : next.getMethodBindings()) {
if (resourceToMethods.containsKey(resourceName) == false) {
resourceToMethods.put(resourceName, new ArrayList<BaseMethodBinding<?>>());
}
resourceToMethods.get(resourceName).add(nextMethodBinding);
}
}
for (BaseMethodBinding<?> nextMethodBinding : myRestfulServer.getServerBindings()) {
String resourceName = "";
if (resourceToMethods.containsKey(resourceName) == false) {
resourceToMethods.put(resourceName, new ArrayList<BaseMethodBinding<?>>());
}
resourceToMethods.get(resourceName).add(nextMethodBinding);
}
return resourceToMethods;
}
private Map<String, List<BaseMethodBinding<?>>> collectMethodBindings() {
Map<String, List<BaseMethodBinding<?>>> resourceToMethods = new TreeMap<String, List<BaseMethodBinding<?>>>();
for (ResourceBinding next : myRestfulServer.getResourceBindings()) {
String resourceName = next.getResourceName();
for (BaseMethodBinding<?> nextMethodBinding : next.getMethodBindings()) {
if (resourceToMethods.containsKey(resourceName) == false) {
resourceToMethods.put(resourceName, new ArrayList<BaseMethodBinding<?>>());
}
resourceToMethods.get(resourceName).add(nextMethodBinding);
}
}
for (BaseMethodBinding<?> nextMethodBinding : myRestfulServer.getServerBindings()) {
String resourceName = "";
if (resourceToMethods.containsKey(resourceName) == false) {
resourceToMethods.put(resourceName, new ArrayList<BaseMethodBinding<?>>());
}
resourceToMethods.get(resourceName).add(nextMethodBinding);
}
return resourceToMethods;
}
private String createOperationName(OperationMethodBinding theMethodBinding) {
return theMethodBinding.getName().substring(1);
}
private String createOperationName(OperationMethodBinding theMethodBinding) {
return theMethodBinding.getName().substring(1);
}
/**
* Gets the value of the "publisher" that will be placed in the generated conformance statement. As this is a
* mandatory element, the value should not be null (although this is not enforced). The value defaults to
* "Not provided" but may be set to null, which will cause this element to be omitted.
*/
public String getPublisher() {
return myPublisher;
}
/**
* Gets the value of the "publisher" that will be placed in the generated conformance statement. As this is a mandatory element, the value should not be null
* (although this is not enforced). The value defaults to "Not provided" but may be set to null, which will cause this element to be omitted.
*/
public String getPublisher() {
return myPublisher;
}
@Override
@Metadata
public Conformance getServerConformance(HttpServletRequest theRequest) {
if (myConformance != null && myCache) {
return myConformance;
}
@Override
@Metadata
public Conformance getServerConformance(HttpServletRequest theRequest) {
if (myConformance != null && myCache) {
return myConformance;
}
Conformance retVal = new Conformance();
Conformance retVal = new Conformance();
retVal.setPublisher(myPublisher);
retVal.setDate(new Date());
retVal.setFhirVersion("0.5.0"); // TODO: pull from model
retVal.setAcceptUnknown(false); // TODO: make this configurable - this is a fairly big effort since the parser
// needs to be modified to actually allow it
retVal.setPublisher(myPublisher);
retVal.setDate(new Date());
retVal.setFhirVersion("0.5.0"); // TODO: pull from model
retVal.setAcceptUnknown(UnknownContentCode.EXTENSIONS); // TODO: make this configurable - this is a fairly big effort since the parser
// needs to be modified to actually allow it
retVal.getImplementation().setDescription(myRestfulServer.getImplementationDescription());
retVal.getSoftware().setName(myRestfulServer.getServerName());
retVal.getSoftware().setVersion(myRestfulServer.getServerVersion());
retVal.addFormat(Constants.CT_FHIR_XML);
retVal.addFormat(Constants.CT_FHIR_JSON);
retVal.getImplementation().setDescription(myRestfulServer.getImplementationDescription());
retVal.setKind(ConformanceStatementKind.INSTANCE);
retVal.getSoftware().setName(myRestfulServer.getServerName());
retVal.getSoftware().setVersion(myRestfulServer.getServerVersion());
retVal.addFormat(Constants.CT_FHIR_XML);
retVal.addFormat(Constants.CT_FHIR_JSON);
ConformanceRestComponent rest = retVal.addRest();
rest.setMode(RestfulConformanceMode.SERVER);
ConformanceRestComponent rest = retVal.addRest();
rest.setMode(RestfulConformanceMode.SERVER);
Set<SystemRestfulInteraction> systemOps = new HashSet<SystemRestfulInteraction>();
Set<String> operationNames = new HashSet<String>();
Set<SystemRestfulInteraction> systemOps = new HashSet<SystemRestfulInteraction>();
Set<String> operationNames = new HashSet<String>();
Map<String, List<BaseMethodBinding<?>>> resourceToMethods = collectMethodBindings();
for (Entry<String, List<BaseMethodBinding<?>>> nextEntry : resourceToMethods.entrySet()) {
Map<String, List<BaseMethodBinding<?>>> resourceToMethods = collectMethodBindings();
for (Entry<String, List<BaseMethodBinding<?>>> nextEntry : resourceToMethods.entrySet()) {
if (nextEntry.getKey().isEmpty() == false) {
Set<TypeRestfulInteraction> resourceOps = new HashSet<TypeRestfulInteraction>();
ConformanceRestResourceComponent resource = rest.addResource();
String resourceName = nextEntry.getKey();
RuntimeResourceDefinition def = myRestfulServer.getFhirContext().getResourceDefinition(resourceName);
resource.getTypeElement().setValue(def.getName());
resource.getProfile().setReference((def.getResourceProfile(myRestfulServer.getServerBaseForRequest(theRequest))));
if (nextEntry.getKey().isEmpty() == false) {
Set<TypeRestfulInteraction> resourceOps = new HashSet<TypeRestfulInteraction>();
ConformanceRestResourceComponent resource = rest.addResource();
String resourceName = nextEntry.getKey();
RuntimeResourceDefinition def = myRestfulServer.getFhirContext().getResourceDefinition(resourceName);
resource.getTypeElement().setValue(def.getName());
resource.getProfile()
.setReference((def.getResourceProfile(myRestfulServer.getServerBaseForRequest(theRequest))));
TreeSet<String> includes = new TreeSet<String>();
TreeSet<String> includes = new TreeSet<String>();
// Map<String, Conformance.RestResourceSearchParam> nameToSearchParam = new HashMap<String,
// Conformance.RestResourceSearchParam>();
for (BaseMethodBinding<?> nextMethodBinding : nextEntry.getValue()) {
if (nextMethodBinding.getResourceOperationType() != null) {
String resOpCode = nextMethodBinding.getResourceOperationType().getCode();
if (resOpCode != null) {
TypeRestfulInteraction resOp;
try {
resOp = TypeRestfulInteraction.fromCode(resOpCode);
} catch (Exception e) {
resOp = null;
}
if (resOp == null) {
throw new InternalErrorException("Unknown type-restful-interaction: " + resOpCode);
}
if (resourceOps.contains(resOp) == false) {
resourceOps.add(resOp);
resource.addInteraction().setCode(resOp);
}
if ("vread".equals(resOpCode)) {
// vread implies read
resOp = TypeRestfulInteraction.READ;
if (resourceOps.contains(resOp) == false) {
resourceOps.add(resOp);
resource.addInteraction().setCode(resOp);
}
}
// Map<String, Conformance.RestResourceSearchParam> nameToSearchParam = new HashMap<String,
// Conformance.RestResourceSearchParam>();
for (BaseMethodBinding<?> nextMethodBinding : nextEntry.getValue()) {
if (nextMethodBinding.getResourceOperationType() != null) {
String resOpCode = nextMethodBinding.getResourceOperationType().getCode();
if (resOpCode != null) {
TypeRestfulInteraction resOp;
try {
resOp = TypeRestfulInteraction.fromCode(resOpCode);
} catch (Exception e) {
resOp = null;
}
if (resOp == null) {
throw new InternalErrorException("Unknown type-restful-interaction: " + resOpCode);
}
if (resourceOps.contains(resOp) == false) {
resourceOps.add(resOp);
resource.addInteraction().setCode(resOp);
}
if ("vread".equals(resOpCode)) {
// vread implies read
resOp = TypeRestfulInteraction.READ;
if (resourceOps.contains(resOp) == false) {
resourceOps.add(resOp);
resource.addInteraction().setCode(resOp);
}
}
if (nextMethodBinding.isSupportsConditional()) {
switch (resOp) {
case CREATE:
resource.setConditionalCreate(true);
break;
case DELETE:
resource.setConditionalDelete(ConditionalDeleteStatus.SINGLE);
break;
case UPDATE:
resource.setConditionalUpdate(true);
break;
default:
break;
}
}
}
}
if (nextMethodBinding.isSupportsConditional()) {
switch (resOp) {
case CREATE:
resource.setConditionalCreate(true);
break;
case DELETE:
resource.setConditionalDelete(ConditionalDeleteStatus.SINGLE);
break;
case UPDATE:
resource.setConditionalUpdate(true);
break;
default:
break;
}
}
}
}
checkBindingForSystemOps(rest, systemOps, nextMethodBinding);
checkBindingForSystemOps(rest, systemOps, nextMethodBinding);
if (nextMethodBinding instanceof SearchMethodBinding) {
handleSearchMethodBinding(rest, resource, resourceName, def, includes, (SearchMethodBinding) nextMethodBinding);
} else if (nextMethodBinding instanceof DynamicSearchMethodBinding) {
handleDynamicSearchMethodBinding(resource, def, includes, (DynamicSearchMethodBinding) nextMethodBinding);
} else if (nextMethodBinding instanceof OperationMethodBinding) {
OperationMethodBinding methodBinding = (OperationMethodBinding) nextMethodBinding;
String opName = myOperationBindingToName.get(methodBinding);
if (operationNames.add(opName)) {
// Only add each operation (by name) once
rest.addOperation().setName(methodBinding.getName()).getDefinition().setReference("OperationDefinition/" + opName);
}
}
if (nextMethodBinding instanceof SearchMethodBinding) {
handleSearchMethodBinding(rest, resource, resourceName, def, includes,
(SearchMethodBinding) nextMethodBinding);
} else if (nextMethodBinding instanceof DynamicSearchMethodBinding) {
handleDynamicSearchMethodBinding(resource, def, includes, (DynamicSearchMethodBinding) nextMethodBinding);
} else if (nextMethodBinding instanceof OperationMethodBinding) {
OperationMethodBinding methodBinding = (OperationMethodBinding) nextMethodBinding;
String opName = myOperationBindingToName.get(methodBinding);
if (operationNames.add(opName)) {
// Only add each operation (by name) once
rest.addOperation().setName(methodBinding.getName()).getDefinition()
.setReference("OperationDefinition/" + opName);
}
}
Collections.sort(resource.getInteraction(), new Comparator<ResourceInteractionComponent>() {
@Override
public int compare(ResourceInteractionComponent theO1, ResourceInteractionComponent theO2) {
TypeRestfulInteraction o1 = theO1.getCode();
TypeRestfulInteraction o2 = theO2.getCode();
if (o1 == null && o2 == null) {
return 0;
}
if (o1 == null) {
return 1;
}
if (o2 == null) {
return -1;
}
return o1.ordinal() - o2.ordinal();
}
});
Collections.sort(resource.getInteraction(), new Comparator<ResourceInteractionComponent>() {
@Override
public int compare(ResourceInteractionComponent theO1, ResourceInteractionComponent theO2) {
TypeRestfulInteraction o1 = theO1.getCode();
TypeRestfulInteraction o2 = theO2.getCode();
if (o1 == null && o2 == null) {
return 0;
}
if (o1 == null) {
return 1;
}
if (o2 == null) {
return -1;
}
return o1.ordinal() - o2.ordinal();
}
});
}
}
for (String nextInclude : includes) {
resource.addSearchInclude(nextInclude);
}
} else {
for (BaseMethodBinding<?> nextMethodBinding : nextEntry.getValue()) {
checkBindingForSystemOps(rest, systemOps, nextMethodBinding);
if (nextMethodBinding instanceof OperationMethodBinding) {
OperationMethodBinding methodBinding = (OperationMethodBinding) nextMethodBinding;
String opName = myOperationBindingToName.get(methodBinding);
if (operationNames.add(opName)) {
rest.addOperation().setName(methodBinding.getName()).getDefinition().setReference("OperationDefinition/" + opName);
}
}
}
}
}
for (String nextInclude : includes) {
resource.addSearchInclude(nextInclude);
}
} else {
for (BaseMethodBinding<?> nextMethodBinding : nextEntry.getValue()) {
checkBindingForSystemOps(rest, systemOps, nextMethodBinding);
if (nextMethodBinding instanceof OperationMethodBinding) {
OperationMethodBinding methodBinding = (OperationMethodBinding) nextMethodBinding;
String opName = myOperationBindingToName.get(methodBinding);
if (operationNames.add(opName)) {
rest.addOperation().setName(methodBinding.getName()).getDefinition()
.setReference("OperationDefinition/" + opName);
}
}
}
}
}
myConformance = retVal;
return retVal;
}
myConformance = retVal;
return retVal;
}
private void handleDynamicSearchMethodBinding(ConformanceRestResourceComponent resource, RuntimeResourceDefinition def, TreeSet<String> includes, DynamicSearchMethodBinding searchMethodBinding) {
includes.addAll(searchMethodBinding.getIncludes());
private void handleDynamicSearchMethodBinding(ConformanceRestResourceComponent resource,
RuntimeResourceDefinition def, TreeSet<String> includes, DynamicSearchMethodBinding searchMethodBinding) {
includes.addAll(searchMethodBinding.getIncludes());
List<RuntimeSearchParam> searchParameters = new ArrayList<RuntimeSearchParam>();
searchParameters.addAll(searchMethodBinding.getSearchParams());
sortRuntimeSearchParameters(searchParameters);
List<RuntimeSearchParam> searchParameters = new ArrayList<RuntimeSearchParam>();
searchParameters.addAll(searchMethodBinding.getSearchParams());
sortRuntimeSearchParameters(searchParameters);
if (!searchParameters.isEmpty()) {
if (!searchParameters.isEmpty()) {
for (RuntimeSearchParam nextParameter : searchParameters) {
for (RuntimeSearchParam nextParameter : searchParameters) {
String nextParamName = nextParameter.getName();
String nextParamName = nextParameter.getName();
// String chain = null;
String nextParamUnchainedName = nextParamName;
if (nextParamName.contains(".")) {
// chain = nextParamName.substring(nextParamName.indexOf('.') + 1);
nextParamUnchainedName = nextParamName.substring(0, nextParamName.indexOf('.'));
}
// String chain = null;
String nextParamUnchainedName = nextParamName;
if (nextParamName.contains(".")) {
// chain = nextParamName.substring(nextParamName.indexOf('.') + 1);
nextParamUnchainedName = nextParamName.substring(0, nextParamName.indexOf('.'));
}
String nextParamDescription = nextParameter.getDescription();
String nextParamDescription = nextParameter.getDescription();
/*
* If the parameter has no description, default to the one from the resource
*/
if (StringUtils.isBlank(nextParamDescription)) {
RuntimeSearchParam paramDef = def.getSearchParam(nextParamUnchainedName);
if (paramDef != null) {
nextParamDescription = paramDef.getDescription();
}
}
/*
* If the parameter has no description, default to the one from the resource
*/
if (StringUtils.isBlank(nextParamDescription)) {
RuntimeSearchParam paramDef = def.getSearchParam(nextParamUnchainedName);
if (paramDef != null) {
nextParamDescription = paramDef.getDescription();
}
}
ConformanceRestResourceSearchParamComponent param = resource.addSearchParam();
ConformanceRestResourceSearchParamComponent param = resource.addSearchParam();
param.setName(nextParamName);
// if (StringUtils.isNotBlank(chain)) {
// param.addChain(chain);
// }
param.setDocumentation(nextParamDescription);
// param.setType(nextParameter.getParamType());
}
}
}
param.setName(nextParamName);
// if (StringUtils.isNotBlank(chain)) {
// param.addChain(chain);
// }
param.setDocumentation(nextParamDescription);
// param.setType(nextParameter.getParamType());
}
}
}
private void handleSearchMethodBinding(ConformanceRestComponent rest, ConformanceRestResourceComponent resource, String resourceName, RuntimeResourceDefinition def, TreeSet<String> includes, SearchMethodBinding searchMethodBinding) {
includes.addAll(searchMethodBinding.getIncludes());
private void handleSearchMethodBinding(ConformanceRestComponent rest, ConformanceRestResourceComponent resource,
String resourceName, RuntimeResourceDefinition def, TreeSet<String> includes,
SearchMethodBinding searchMethodBinding) {
includes.addAll(searchMethodBinding.getIncludes());
List<IParameter> params = searchMethodBinding.getParameters();
List<SearchParameter> searchParameters = new ArrayList<SearchParameter>();
for (IParameter nextParameter : params) {
if ((nextParameter instanceof SearchParameter)) {
searchParameters.add((SearchParameter) nextParameter);
}
}
sortSearchParameters(searchParameters);
if (!searchParameters.isEmpty()) {
// boolean allOptional = searchParameters.get(0).isRequired() == false;
//
// OperationDefinition query = null;
// if (!allOptional) {
// RestOperation operation = rest.addOperation();
// query = new OperationDefinition();
// operation.setDefinition(new ResourceReferenceDt(query));
// query.getDescriptionElement().setValue(searchMethodBinding.getDescription());
// query.addUndeclaredExtension(false, ExtensionConstants.QUERY_RETURN_TYPE, new CodeDt(resourceName));
// for (String nextInclude : searchMethodBinding.getIncludes()) {
// query.addUndeclaredExtension(false, ExtensionConstants.QUERY_ALLOWED_INCLUDE, new StringDt(nextInclude));
// }
// }
List<IParameter> params = searchMethodBinding.getParameters();
List<SearchParameter> searchParameters = new ArrayList<SearchParameter>();
for (IParameter nextParameter : params) {
if ((nextParameter instanceof SearchParameter)) {
searchParameters.add((SearchParameter) nextParameter);
}
}
sortSearchParameters(searchParameters);
if (!searchParameters.isEmpty()) {
// boolean allOptional = searchParameters.get(0).isRequired() == false;
//
// OperationDefinition query = null;
// if (!allOptional) {
// RestOperation operation = rest.addOperation();
// query = new OperationDefinition();
// operation.setDefinition(new ResourceReferenceDt(query));
// query.getDescriptionElement().setValue(searchMethodBinding.getDescription());
// query.addUndeclaredExtension(false, ExtensionConstants.QUERY_RETURN_TYPE, new CodeDt(resourceName));
// for (String nextInclude : searchMethodBinding.getIncludes()) {
// query.addUndeclaredExtension(false, ExtensionConstants.QUERY_ALLOWED_INCLUDE, new StringDt(nextInclude));
// }
// }
for (SearchParameter nextParameter : searchParameters) {
for (SearchParameter nextParameter : searchParameters) {
String nextParamName = nextParameter.getName();
String nextParamName = nextParameter.getName();
String chain = null;
String nextParamUnchainedName = nextParamName;
if (nextParamName.contains(".")) {
chain = nextParamName.substring(nextParamName.indexOf('.') + 1);
nextParamUnchainedName = nextParamName.substring(0, nextParamName.indexOf('.'));
}
String chain = null;
String nextParamUnchainedName = nextParamName;
if (nextParamName.contains(".")) {
chain = nextParamName.substring(nextParamName.indexOf('.') + 1);
nextParamUnchainedName = nextParamName.substring(0, nextParamName.indexOf('.'));
}
String nextParamDescription = nextParameter.getDescription();
String nextParamDescription = nextParameter.getDescription();
/*
* If the parameter has no description, default to the one from the resource
*/
if (StringUtils.isBlank(nextParamDescription)) {
RuntimeSearchParam paramDef = def.getSearchParam(nextParamUnchainedName);
if (paramDef != null) {
nextParamDescription = paramDef.getDescription();
}
}
/*
* If the parameter has no description, default to the one from the resource
*/
if (StringUtils.isBlank(nextParamDescription)) {
RuntimeSearchParam paramDef = def.getSearchParam(nextParamUnchainedName);
if (paramDef != null) {
nextParamDescription = paramDef.getDescription();
}
}
ConformanceRestResourceSearchParamComponent param = resource.addSearchParam();
param.setName(nextParamUnchainedName);
if (StringUtils.isNotBlank(chain)) {
param.addChain(chain);
}
param.setDocumentation(nextParamDescription);
if (nextParameter.getParamType() != null) {
param.getTypeElement().setValueAsString(nextParameter.getParamType().getCode());
}
for (Class<? extends IResource> nextTarget : nextParameter.getDeclaredTypes()) {
RuntimeResourceDefinition targetDef = myRestfulServer.getFhirContext().getResourceDefinition(nextTarget);
if (targetDef != null) {
ResourceType code;
try {
code = ResourceType.fromCode(targetDef.getName());
} catch (Exception e) {
code = null;
}
if (code != null) {
param.addTarget(code.toCode());
}
}
}
}
}
}
ConformanceRestResourceSearchParamComponent param = resource.addSearchParam();
param.setName(nextParamUnchainedName);
if (StringUtils.isNotBlank(chain)) {
param.addChain(chain);
}
param.setDocumentation(nextParamDescription);
if (nextParameter.getParamType() != null) {
param.getTypeElement().setValueAsString(nextParameter.getParamType().getCode());
}
for (Class<? extends IResource> nextTarget : nextParameter.getDeclaredTypes()) {
RuntimeResourceDefinition targetDef = myRestfulServer.getFhirContext().getResourceDefinition(nextTarget);
if (targetDef != null) {
ResourceType code;
try {
code = ResourceType.fromCode(targetDef.getName());
} catch (Exception e) {
code = null;
}
if (code != null) {
param.addTarget(code.toCode());
}
}
}
}
}
}
@Initialize
public void initializeOperations() {
myOperationBindingToName = new IdentityHashMap<OperationMethodBinding, String>();
myOperationNameToBindings = new HashMap<String, List<OperationMethodBinding>>();
@Initialize
public void initializeOperations() {
myOperationBindingToName = new IdentityHashMap<OperationMethodBinding, String>();
myOperationNameToBindings = new HashMap<String, List<OperationMethodBinding>>();
Map<String, List<BaseMethodBinding<?>>> resourceToMethods = collectMethodBindings();
for (Entry<String, List<BaseMethodBinding<?>>> nextEntry : resourceToMethods.entrySet()) {
List<BaseMethodBinding<?>> nextMethodBindings = nextEntry.getValue();
for (BaseMethodBinding<?> nextMethodBinding : nextMethodBindings) {
if (nextMethodBinding instanceof OperationMethodBinding) {
OperationMethodBinding methodBinding = (OperationMethodBinding) nextMethodBinding;
if (myOperationBindingToName.containsKey(methodBinding)) {
continue;
}
Map<String, List<BaseMethodBinding<?>>> resourceToMethods = collectMethodBindings();
for (Entry<String, List<BaseMethodBinding<?>>> nextEntry : resourceToMethods.entrySet()) {
List<BaseMethodBinding<?>> nextMethodBindings = nextEntry.getValue();
for (BaseMethodBinding<?> nextMethodBinding : nextMethodBindings) {
if (nextMethodBinding instanceof OperationMethodBinding) {
OperationMethodBinding methodBinding = (OperationMethodBinding) nextMethodBinding;
if (myOperationBindingToName.containsKey(methodBinding)) {
continue;
}
String name = createOperationName(methodBinding);
myOperationBindingToName.put(methodBinding, name);
if (myOperationNameToBindings.containsKey(name) == false) {
myOperationNameToBindings.put(name, new ArrayList<OperationMethodBinding>());
}
myOperationNameToBindings.get(name).add(methodBinding);
}
}
}
}
String name = createOperationName(methodBinding);
myOperationBindingToName.put(methodBinding, name);
if (myOperationNameToBindings.containsKey(name) == false) {
myOperationNameToBindings.put(name, new ArrayList<OperationMethodBinding>());
}
myOperationNameToBindings.get(name).add(methodBinding);
}
}
}
}
@Read(type = OperationDefinition.class)
public OperationDefinition readOperationDefinition(@IdParam IdDt theId) {
if (theId == null || theId.hasIdPart() == false) {
throw new ResourceNotFoundException(theId);
}
List<OperationMethodBinding> sharedDescriptions = myOperationNameToBindings.get(theId.getIdPart());
if (sharedDescriptions == null || sharedDescriptions.isEmpty()) {
throw new ResourceNotFoundException(theId);
}
@Read(type = OperationDefinition.class)
public OperationDefinition readOperationDefinition(@IdParam IdDt theId) {
if (theId == null || theId.hasIdPart() == false) {
throw new ResourceNotFoundException(theId);
}
List<OperationMethodBinding> sharedDescriptions = myOperationNameToBindings.get(theId.getIdPart());
if (sharedDescriptions == null || sharedDescriptions.isEmpty()) {
throw new ResourceNotFoundException(theId);
}
OperationDefinition op = new OperationDefinition();
op.setStatus(ConformanceResourceStatus.ACTIVE);
op.setIdempotent(true);
OperationDefinition op = new OperationDefinition();
op.setStatus(ConformanceResourceStatus.ACTIVE);
op.setIdempotent(true);
Set<String> inParams = new HashSet<String>();
Set<String> outParams = new HashSet<String>();
Set<String> inParams = new HashSet<String>();
Set<String> outParams = new HashSet<String>();
for (OperationMethodBinding sharedDescription : sharedDescriptions) {
if (isNotBlank(sharedDescription.getDescription())) {
op.setDescription(sharedDescription.getDescription());
}
if (!sharedDescription.isIdempotent()) {
op.setIdempotent(sharedDescription.isIdempotent());
}
op.setCode(sharedDescription.getName());
if (sharedDescription.isCanOperateAtInstanceLevel()) {
op.setInstance(sharedDescription.isCanOperateAtInstanceLevel());
}
if (sharedDescription.isCanOperateAtServerLevel()) {
op.setSystem(sharedDescription.isCanOperateAtServerLevel());
}
if (isNotBlank(sharedDescription.getResourceName())) {
op.addTypeElement().setValue(sharedDescription.getResourceName());
}
for (OperationMethodBinding sharedDescription : sharedDescriptions) {
if (isNotBlank(sharedDescription.getDescription())) {
op.setDescription(sharedDescription.getDescription());
}
if (!sharedDescription.isIdempotent()) {
op.setIdempotent(sharedDescription.isIdempotent());
}
op.setCode(sharedDescription.getName());
if (sharedDescription.isCanOperateAtInstanceLevel()) {
op.setInstance(sharedDescription.isCanOperateAtInstanceLevel());
}
if (sharedDescription.isCanOperateAtServerLevel()) {
op.setSystem(sharedDescription.isCanOperateAtServerLevel());
}
if (isNotBlank(sharedDescription.getResourceName())) {
op.addTypeElement().setValue(sharedDescription.getResourceName());
}
for (IParameter nextParamUntyped : sharedDescription.getParameters()) {
if (nextParamUntyped instanceof OperationParameter) {
OperationParameter nextParam = (OperationParameter) nextParamUntyped;
OperationDefinitionParameterComponent param = op.addParameter();
if (!inParams.add(nextParam.getName())) {
continue;
}
param.setUse(OperationParameterUse.IN);
if (nextParam.getParamType() != null) {
param.setType(nextParam.getParamType());
}
param.setMin(nextParam.getMin());
param.setMax(nextParam.getMax() == -1 ? "*" : Integer.toString(nextParam.getMax()));
param.setName(nextParam.getName());
}
}
for (IParameter nextParamUntyped : sharedDescription.getParameters()) {
if (nextParamUntyped instanceof OperationParameter) {
OperationParameter nextParam = (OperationParameter) nextParamUntyped;
OperationDefinitionParameterComponent param = op.addParameter();
if (!inParams.add(nextParam.getName())) {
continue;
}
param.setUse(OperationParameterUse.IN);
if (nextParam.getParamType() != null) {
param.setType(nextParam.getParamType());
}
param.setMin(nextParam.getMin());
param.setMax(nextParam.getMax() == -1 ? "*" : Integer.toString(nextParam.getMax()));
param.setName(nextParam.getName());
}
}
for (ReturnType nextParam : sharedDescription.getReturnParams()) {
if (!outParams.add(nextParam.getName())) {
continue;
}
OperationDefinitionParameterComponent param = op.addParameter();
param.setUse(OperationParameterUse.OUT);
if (nextParam.getType() != null) {
param.setType(nextParam.getType());
}
param.setMin(nextParam.getMin());
param.setMax(nextParam.getMax() == -1 ? "*" : Integer.toString(nextParam.getMax()));
param.setName(nextParam.getName());
}
}
for (ReturnType nextParam : sharedDescription.getReturnParams()) {
if (!outParams.add(nextParam.getName())) {
continue;
}
OperationDefinitionParameterComponent param = op.addParameter();
param.setUse(OperationParameterUse.OUT);
if (nextParam.getType() != null) {
param.setType(nextParam.getType());
}
param.setMin(nextParam.getMin());
param.setMax(nextParam.getMax() == -1 ? "*" : Integer.toString(nextParam.getMax()));
param.setName(nextParam.getName());
}
}
return op;
}
return op;
}
/**
* Sets the cache property (default is true). If set to true, the same response will be returned for each invocation.
* <p>
* See the class documentation for an important note if you are extending this class
* </p>
*/
public void setCache(boolean theCache) {
myCache = theCache;
}
/**
* Sets the cache property (default is true). If set to true, the same response will be returned for each invocation.
* <p>
* See the class documentation for an important note if you are extending this class
* </p>
*/
public void setCache(boolean theCache) {
myCache = theCache;
}
/**
* Sets the value of the "publisher" that will be placed in the generated conformance statement. As this is a
* mandatory element, the value should not be null (although this is not enforced). The value defaults to
* "Not provided" but may be set to null, which will cause this element to be omitted.
*/
public void setPublisher(String thePublisher) {
myPublisher = thePublisher;
}
/**
* Sets the value of the "publisher" that will be placed in the generated conformance statement. As this is a mandatory element, the value should not be null
* (although this is not enforced). The value defaults to "Not provided" but may be set to null, which will cause this element to be omitted.
*/
public void setPublisher(String thePublisher) {
myPublisher = thePublisher;
}
private void sortRuntimeSearchParameters(List<RuntimeSearchParam> searchParameters) {
Collections.sort(searchParameters, new Comparator<RuntimeSearchParam>() {
@Override
public int compare(RuntimeSearchParam theO1, RuntimeSearchParam theO2) {
return theO1.getName().compareTo(theO2.getName());
}
});
}
private void sortRuntimeSearchParameters(List<RuntimeSearchParam> searchParameters) {
Collections.sort(searchParameters, new Comparator<RuntimeSearchParam>() {
@Override
public int compare(RuntimeSearchParam theO1, RuntimeSearchParam theO2) {
return theO1.getName().compareTo(theO2.getName());
}
});
}
private void sortSearchParameters(List<SearchParameter> searchParameters) {
Collections.sort(searchParameters, new Comparator<SearchParameter>() {
@Override
public int compare(SearchParameter theO1, SearchParameter theO2) {
if (theO1.isRequired() == theO2.isRequired()) {
return theO1.getName().compareTo(theO2.getName());
}
if (theO1.isRequired()) {
return -1;
}
return 1;
}
});
}
private void sortSearchParameters(List<SearchParameter> searchParameters) {
Collections.sort(searchParameters, new Comparator<SearchParameter>() {
@Override
public int compare(SearchParameter theO1, SearchParameter theO2) {
if (theO1.isRequired() == theO2.isRequired()) {
return theO1.getName().compareTo(theO2.getName());
}
if (theO1.isRequired()) {
return -1;
}
return 1;
}
});
}
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -253,11 +253,10 @@ public class Address extends Type implements ICompositeType {
protected StringType text;
/**
* This component contains the house number, apartment number, street name, street direction,
P.O. Box number, delivery hints, and similar address information.
* This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.
*/
@Child(name = "line", type = {StringType.class}, order=3, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Street name, number, direction & P.O. Box etc", formalDefinition="This component contains the house number, apartment number, street name, street direction, \nP.O. Box number, delivery hints, and similar address information." )
@Description(shortDefinition="Street name, number, direction & P.O. Box etc", formalDefinition="This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information." )
protected List<StringType> line;
/**
@ -267,35 +266,42 @@ P.O. Box number, delivery hints, and similar address information.
@Description(shortDefinition="Name of city, town etc.", formalDefinition="The name of the city, town, village or other community or delivery center." )
protected StringType city;
/**
* The name of the administrative area (county).
*/
@Child(name = "district", type = {StringType.class}, order=5, min=0, max=1)
@Description(shortDefinition="District name (aka county)", formalDefinition="The name of the administrative area (county)." )
protected StringType district;
/**
* Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).
*/
@Child(name = "state", type = {StringType.class}, order=5, min=0, max=1)
@Child(name = "state", type = {StringType.class}, order=6, min=0, max=1)
@Description(shortDefinition="Sub-unit of country (abreviations ok)", formalDefinition="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes)." )
protected StringType state;
/**
* A postal code designating a region defined by the postal service.
*/
@Child(name = "postalCode", type = {StringType.class}, order=6, min=0, max=1)
@Child(name = "postalCode", type = {StringType.class}, order=7, min=0, max=1)
@Description(shortDefinition="Postal code for area", formalDefinition="A postal code designating a region defined by the postal service." )
protected StringType postalCode;
/**
* Country - a nation as commonly understood or generally accepted.
*/
@Child(name = "country", type = {StringType.class}, order=7, min=0, max=1)
@Child(name = "country", type = {StringType.class}, order=8, min=0, max=1)
@Description(shortDefinition="Country (can be ISO 3166 3 letter code)", formalDefinition="Country - a nation as commonly understood or generally accepted." )
protected StringType country;
/**
* Time period when address was/is in use.
*/
@Child(name = "period", type = {Period.class}, order=8, min=0, max=1)
@Child(name = "period", type = {Period.class}, order=9, min=0, max=1)
@Description(shortDefinition="Time period when address was/is in use", formalDefinition="Time period when address was/is in use." )
protected Period period;
private static final long serialVersionUID = 1890613287L;
private static final long serialVersionUID = 561490318L;
/*
* Constructor
@ -452,8 +458,7 @@ P.O. Box number, delivery hints, and similar address information.
}
/**
* @return {@link #line} (This component contains the house number, apartment number, street name, street direction,
P.O. Box number, delivery hints, and similar address information.)
* @return {@link #line} (This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.)
*/
public List<StringType> getLine() {
if (this.line == null)
@ -471,8 +476,7 @@ P.O. Box number, delivery hints, and similar address information.)
}
/**
* @return {@link #line} (This component contains the house number, apartment number, street name, street direction,
P.O. Box number, delivery hints, and similar address information.)
* @return {@link #line} (This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.)
*/
// syntactic sugar
public StringType addLineElement() {//2
@ -484,8 +488,7 @@ P.O. Box number, delivery hints, and similar address information.)
}
/**
* @param value {@link #line} (This component contains the house number, apartment number, street name, street direction,
P.O. Box number, delivery hints, and similar address information.)
* @param value {@link #line} (This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.)
*/
public Address addLine(String value) { //1
StringType t = new StringType();
@ -497,8 +500,7 @@ P.O. Box number, delivery hints, and similar address information.)
}
/**
* @param value {@link #line} (This component contains the house number, apartment number, street name, street direction,
P.O. Box number, delivery hints, and similar address information.)
* @param value {@link #line} (This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.)
*/
public boolean hasLine(String value) {
if (this.line == null)
@ -558,6 +560,55 @@ P.O. Box number, delivery hints, and similar address information.)
return this;
}
/**
* @return {@link #district} (The name of the administrative area (county).). This is the underlying object with id, value and extensions. The accessor "getDistrict" gives direct access to the value
*/
public StringType getDistrictElement() {
if (this.district == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Address.district");
else if (Configuration.doAutoCreate())
this.district = new StringType(); // bb
return this.district;
}
public boolean hasDistrictElement() {
return this.district != null && !this.district.isEmpty();
}
public boolean hasDistrict() {
return this.district != null && !this.district.isEmpty();
}
/**
* @param value {@link #district} (The name of the administrative area (county).). This is the underlying object with id, value and extensions. The accessor "getDistrict" gives direct access to the value
*/
public Address setDistrictElement(StringType value) {
this.district = value;
return this;
}
/**
* @return The name of the administrative area (county).
*/
public String getDistrict() {
return this.district == null ? null : this.district.getValue();
}
/**
* @param value The name of the administrative area (county).
*/
public Address setDistrict(String value) {
if (Utilities.noString(value))
this.district = null;
else {
if (this.district == null)
this.district = new StringType();
this.district.setValue(value);
}
return this;
}
/**
* @return {@link #state} (Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).). This is the underlying object with id, value and extensions. The accessor "getState" gives direct access to the value
*/
@ -734,8 +785,9 @@ P.O. Box number, delivery hints, and similar address information.)
childrenList.add(new Property("use", "code", "The purpose of this address.", 0, java.lang.Integer.MAX_VALUE, use));
childrenList.add(new Property("type", "code", "Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.", 0, java.lang.Integer.MAX_VALUE, type));
childrenList.add(new Property("text", "string", "A full text representation of the address.", 0, java.lang.Integer.MAX_VALUE, text));
childrenList.add(new Property("line", "string", "This component contains the house number, apartment number, street name, street direction, \nP.O. Box number, delivery hints, and similar address information.", 0, java.lang.Integer.MAX_VALUE, line));
childrenList.add(new Property("line", "string", "This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.", 0, java.lang.Integer.MAX_VALUE, line));
childrenList.add(new Property("city", "string", "The name of the city, town, village or other community or delivery center.", 0, java.lang.Integer.MAX_VALUE, city));
childrenList.add(new Property("district", "string", "The name of the administrative area (county).", 0, java.lang.Integer.MAX_VALUE, district));
childrenList.add(new Property("state", "string", "Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).", 0, java.lang.Integer.MAX_VALUE, state));
childrenList.add(new Property("postalCode", "string", "A postal code designating a region defined by the postal service.", 0, java.lang.Integer.MAX_VALUE, postalCode));
childrenList.add(new Property("country", "string", "Country - a nation as commonly understood or generally accepted.", 0, java.lang.Integer.MAX_VALUE, country));
@ -754,6 +806,7 @@ P.O. Box number, delivery hints, and similar address information.)
dst.line.add(i.copy());
};
dst.city = city == null ? null : city.copy();
dst.district = district == null ? null : district.copy();
dst.state = state == null ? null : state.copy();
dst.postalCode = postalCode == null ? null : postalCode.copy();
dst.country = country == null ? null : country.copy();
@ -773,9 +826,9 @@ P.O. Box number, delivery hints, and similar address information.)
return false;
Address o = (Address) other;
return compareDeep(use, o.use, true) && compareDeep(type, o.type, true) && compareDeep(text, o.text, true)
&& compareDeep(line, o.line, true) && compareDeep(city, o.city, true) && compareDeep(state, o.state, true)
&& compareDeep(postalCode, o.postalCode, true) && compareDeep(country, o.country, true) && compareDeep(period, o.period, true)
;
&& compareDeep(line, o.line, true) && compareDeep(city, o.city, true) && compareDeep(district, o.district, true)
&& compareDeep(state, o.state, true) && compareDeep(postalCode, o.postalCode, true) && compareDeep(country, o.country, true)
&& compareDeep(period, o.period, true);
}
@Override
@ -786,15 +839,16 @@ P.O. Box number, delivery hints, and similar address information.)
return false;
Address o = (Address) other;
return compareValues(use, o.use, true) && compareValues(type, o.type, true) && compareValues(text, o.text, true)
&& compareValues(line, o.line, true) && compareValues(city, o.city, true) && compareValues(state, o.state, true)
&& compareValues(postalCode, o.postalCode, true) && compareValues(country, o.country, true);
&& compareValues(line, o.line, true) && compareValues(city, o.city, true) && compareValues(district, o.district, true)
&& compareValues(state, o.state, true) && compareValues(postalCode, o.postalCode, true) && compareValues(country, o.country, true)
;
}
public boolean isEmpty() {
return super.isEmpty() && (use == null || use.isEmpty()) && (type == null || type.isEmpty())
&& (text == null || text.isEmpty()) && (line == null || line.isEmpty()) && (city == null || city.isEmpty())
&& (state == null || state.isEmpty()) && (postalCode == null || postalCode.isEmpty()) && (country == null || country.isEmpty())
&& (period == null || period.isEmpty());
&& (district == null || district.isEmpty()) && (state == null || state.isEmpty()) && (postalCode == null || postalCode.isEmpty())
&& (country == null || country.isEmpty()) && (period == null || period.isEmpty());
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import org.hl7.fhir.instance.model.annotations.DatatypeDef;
import org.hl7.fhir.instance.model.annotations.Block;
@ -40,14 +40,14 @@ import org.hl7.fhir.instance.model.api.*;
@DatatypeDef(name="Age")
public class Age extends Quantity {
private static final long serialVersionUID = -483422721L;
private static final long serialVersionUID = 1069574054L;
public Age copy() {
Age dst = new Age();
copyValues(dst);
dst.value = value == null ? null : value.copy();
dst.comparator = comparator == null ? null : comparator.copy();
dst.units = units == null ? null : units.copy();
dst.unit = unit == null ? null : unit.copy();
dst.system = system == null ? null : system.copy();
dst.code = code == null ? null : code.copy();
return dst;
@ -64,7 +64,7 @@ public class Age extends Quantity {
if (!(other instanceof Age))
return false;
Age o = (Age) other;
return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(units, o.units, true)
return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(unit, o.unit, true)
&& compareDeep(system, o.system, true) && compareDeep(code, o.code, true);
}
@ -75,13 +75,13 @@ public class Age extends Quantity {
if (!(other instanceof Age))
return false;
Age o = (Age) other;
return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(units, o.units, true)
return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(unit, o.unit, true)
&& compareValues(system, o.system, true) && compareValues(code, o.code, true);
}
public boolean isEmpty() {
return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
&& (units == null || units.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
&& (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -3543,8 +3543,6 @@ public class AuditEvent extends DomainResource {
public static final String SP_DATE = "date";
@SearchParamDefinition(name="address", path="AuditEvent.participant.network.identifier", description="Identifier for the network access point of the user device", type="token" )
public static final String SP_ADDRESS = "address";
@SearchParamDefinition(name="patientid", path="", description="The id of the patient (one of multiple kinds of participations)", type="token" )
public static final String SP_PATIENTID = "patientid";
@SearchParamDefinition(name="source", path="AuditEvent.source.identifier", description="The id of source where event originated", type="token" )
public static final String SP_SOURCE = "source";
@SearchParamDefinition(name="type", path="AuditEvent.event.type", description="Type/identifier of event", type="token" )
@ -3561,7 +3559,7 @@ public class AuditEvent extends DomainResource {
public static final String SP_SUBTYPE = "subtype";
@SearchParamDefinition(name="identity", path="AuditEvent.object.identifier", description="Specific instance of object (e.g. versioned)", type="token" )
public static final String SP_IDENTITY = "identity";
@SearchParamDefinition(name="patient", path="", description="A patient that the .object.reference refers to", type="reference" )
@SearchParamDefinition(name="patient", path="AuditEvent.participant.reference|AuditEvent.object.reference", description="Direct reference to resource", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="object-type", path="AuditEvent.object.type", description="Type of object involved", type="token" )
public static final String SP_OBJECTTYPE = "object-type";

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -19,7 +19,12 @@ private Map<String, Object> userData;
/**
* Round tracking xml comments for testing convenience
*/
private List<String> formatComments;
private List<String> formatCommentsPre;
/**
* Round tracking xml comments for testing convenience
*/
private List<String> formatCommentsPost;
public Object getUserData(String name) {
@ -61,13 +66,19 @@ private Map<String, Object> userData;
}
public boolean hasFormatComment() {
return (formatComments != null && !formatComments.isEmpty());
return (formatCommentsPre != null && !formatCommentsPre.isEmpty()) || (formatCommentsPost != null && !formatCommentsPost.isEmpty());
}
public List<String> getFormatComments() {
if (formatComments == null)
formatComments = new ArrayList<String>();
return formatComments;
public List<String> getFormatCommentsPre() {
if (formatCommentsPre == null)
formatCommentsPre = new ArrayList<String>();
return formatCommentsPre;
}
public List<String> getFormatCommentsPost() {
if (formatCommentsPost == null)
formatCommentsPost = new ArrayList<String>();
return formatCommentsPost;
}
protected abstract void listChildren(List<Property> result) ;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -2067,11 +2067,11 @@ public class Bundle extends Resource implements IBaseBundle {
return ResourceType.Bundle;
}
@SearchParamDefinition(name="composition", path="", description="The first resource in the bundle, if the bundle type is 'document' - this is a composition, and this parameter provides access to searches its contents", type="reference" )
@SearchParamDefinition(name="composition", path="Bundle.entry.resource(0)", description="The first resource in the bundle, if the bundle type is 'document' - this is a composition, and this parameter provides access to searches its contents", type="reference" )
public static final String SP_COMPOSITION = "composition";
@SearchParamDefinition(name="type", path="Bundle.type", description="document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection", type="token" )
public static final String SP_TYPE = "type";
@SearchParamDefinition(name="message", path="", description="The first resource in the bundle, if the bundle type is 'message' - this is a message header, and this parameter provides access to search its contents", type="reference" )
@SearchParamDefinition(name="message", path="Bundle.entry.resource(0)", description="The first resource in the bundle, if the bundle type is 'message' - this is a message header, and this parameter provides access to search its contents", type="reference" )
public static final String SP_MESSAGE = "message";
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -568,7 +568,7 @@ public class CarePlan extends DomainResource {
/**
* The details of the proposed activity represented in a specific resource.
*/
@Child(name = "reference", type = {Appointment.class, CommunicationRequest.class, DeviceUseRequest.class, DiagnosticOrder.class, MedicationPrescription.class, NutritionOrder.class, Order.class, ProcedureRequest.class, ProcessRequest.class, ReferralRequest.class, Supply.class, VisionPrescription.class}, order=3, min=0, max=1)
@Child(name = "reference", type = {Appointment.class, CommunicationRequest.class, DeviceUseRequest.class, DiagnosticOrder.class, MedicationPrescription.class, NutritionOrder.class, Order.class, ProcedureRequest.class, ProcessRequest.class, ReferralRequest.class, SupplyRequest.class, VisionPrescription.class}, order=3, min=0, max=1)
@Description(shortDefinition="Activity details defined in specific resource", formalDefinition="The details of the proposed activity represented in a specific resource." )
protected Reference reference;
@ -758,7 +758,7 @@ public class CarePlan extends DomainResource {
super.listChildren(childrenList);
childrenList.add(new Property("actionResulting", "Reference(Any)", "Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc.", 0, java.lang.Integer.MAX_VALUE, actionResulting));
childrenList.add(new Property("notes", "string", "Notes about the execution of the activity.", 0, java.lang.Integer.MAX_VALUE, notes));
childrenList.add(new Property("reference", "Reference(Appointment|CommunicationRequest|DeviceUseRequest|DiagnosticOrder|MedicationPrescription|NutritionOrder|Order|ProcedureRequest|ProcessRequest|ReferralRequest|Supply|VisionPrescription)", "The details of the proposed activity represented in a specific resource.", 0, java.lang.Integer.MAX_VALUE, reference));
childrenList.add(new Property("reference", "Reference(Appointment|CommunicationRequest|DeviceUseRequest|DiagnosticOrder|MedicationPrescription|NutritionOrder|Order|ProcedureRequest|ProcessRequest|ReferralRequest|SupplyRequest|VisionPrescription)", "The details of the proposed activity represented in a specific resource.", 0, java.lang.Integer.MAX_VALUE, reference));
childrenList.add(new Property("detail", "", "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", 0, java.lang.Integer.MAX_VALUE, detail));
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -144,7 +144,7 @@ public class ClinicalImpression extends DomainResource {
/**
* A record of a specific investigation that was undertaken.
*/
@Child(name = "item", type = {Observation.class, QuestionnaireAnswers.class, FamilyMemberHistory.class, DiagnosticReport.class}, order=2, min=0, max=Child.MAX_UNLIMITED)
@Child(name = "item", type = {Observation.class, QuestionnaireResponse.class, FamilyMemberHistory.class, DiagnosticReport.class}, order=2, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Record of a specific investigation", formalDefinition="A record of a specific investigation that was undertaken." )
protected List<Reference> item;
/**
@ -246,7 +246,7 @@ public class ClinicalImpression extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("code", "CodeableConcept", "A name/code for the group ('set') of investigations. Typically, this will be something like 'signs', 'symptoms', 'clinical', 'diagnostic', but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.", 0, java.lang.Integer.MAX_VALUE, code));
childrenList.add(new Property("item", "Reference(Observation|QuestionnaireAnswers|FamilyMemberHistory|DiagnosticReport)", "A record of a specific investigation that was undertaken.", 0, java.lang.Integer.MAX_VALUE, item));
childrenList.add(new Property("item", "Reference(Observation|QuestionnaireResponse|FamilyMemberHistory|DiagnosticReport)", "A record of a specific investigation that was undertaken.", 0, java.lang.Integer.MAX_VALUE, item));
}
public ClinicalImpressionInvestigationsComponent copy() {
@ -710,7 +710,7 @@ public class ClinicalImpression extends DomainResource {
/**
* Plan of action after assessment.
*/
@Child(name = "plan", type = {CarePlan.class, Appointment.class, CommunicationRequest.class, DeviceUseRequest.class, DiagnosticOrder.class, MedicationPrescription.class, NutritionOrder.class, Order.class, ProcedureRequest.class, ProcessRequest.class, ReferralRequest.class, Supply.class, VisionPrescription.class}, order=15, min=0, max=Child.MAX_UNLIMITED)
@Child(name = "plan", type = {CarePlan.class, Appointment.class, CommunicationRequest.class, DeviceUseRequest.class, DiagnosticOrder.class, MedicationPrescription.class, NutritionOrder.class, Order.class, ProcedureRequest.class, ProcessRequest.class, ReferralRequest.class, SupplyRequest.class, VisionPrescription.class}, order=15, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Plan of action after assessment", formalDefinition="Plan of action after assessment." )
protected List<Reference> plan;
/**
@ -722,7 +722,7 @@ public class ClinicalImpression extends DomainResource {
/**
* Actions taken during assessment.
*/
@Child(name = "action", type = {ReferralRequest.class, ProcedureRequest.class, Procedure.class, MedicationPrescription.class, DiagnosticOrder.class, NutritionOrder.class, Supply.class, Appointment.class}, order=16, min=0, max=Child.MAX_UNLIMITED)
@Child(name = "action", type = {ReferralRequest.class, ProcedureRequest.class, Procedure.class, MedicationPrescription.class, DiagnosticOrder.class, NutritionOrder.class, SupplyRequest.class, Appointment.class}, order=16, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Actions taken during assessment", formalDefinition="Actions taken during assessment." )
protected List<Reference> action;
/**
@ -1540,8 +1540,8 @@ public class ClinicalImpression extends DomainResource {
childrenList.add(new Property("resolved", "CodeableConcept", "Diagnoses/conditions resolved since the last assessment.", 0, java.lang.Integer.MAX_VALUE, resolved));
childrenList.add(new Property("ruledOut", "", "Diagnosis considered not possible.", 0, java.lang.Integer.MAX_VALUE, ruledOut));
childrenList.add(new Property("prognosis", "string", "Estimate of likely outcome.", 0, java.lang.Integer.MAX_VALUE, prognosis));
childrenList.add(new Property("plan", "Reference(CarePlan|Appointment|CommunicationRequest|DeviceUseRequest|DiagnosticOrder|MedicationPrescription|NutritionOrder|Order|ProcedureRequest|ProcessRequest|ReferralRequest|Supply|VisionPrescription)", "Plan of action after assessment.", 0, java.lang.Integer.MAX_VALUE, plan));
childrenList.add(new Property("action", "Reference(ReferralRequest|ProcedureRequest|Procedure|MedicationPrescription|DiagnosticOrder|NutritionOrder|Supply|Appointment)", "Actions taken during assessment.", 0, java.lang.Integer.MAX_VALUE, action));
childrenList.add(new Property("plan", "Reference(CarePlan|Appointment|CommunicationRequest|DeviceUseRequest|DiagnosticOrder|MedicationPrescription|NutritionOrder|Order|ProcedureRequest|ProcessRequest|ReferralRequest|SupplyRequest|VisionPrescription)", "Plan of action after assessment.", 0, java.lang.Integer.MAX_VALUE, plan));
childrenList.add(new Property("action", "Reference(ReferralRequest|ProcedureRequest|Procedure|MedicationPrescription|DiagnosticOrder|NutritionOrder|SupplyRequest|Appointment)", "Actions taken during assessment.", 0, java.lang.Integer.MAX_VALUE, action));
}
public ClinicalImpression copy() {

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -706,25 +706,53 @@ public class Composition extends DomainResource {
protected CodeableConcept code;
/**
* The content (narrative and data entries) associated with the section.
* A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.
*/
@Child(name = "content", type = {List_.class}, order=3, min=0, max=1)
@Description(shortDefinition="The Content of the section (narrative + data entries)", formalDefinition="The content (narrative and data entries) associated with the section." )
protected Reference content;
@Child(name = "text", type = {Narrative.class}, order=3, min=0, max=1)
@Description(shortDefinition="Text summary of the section, for human interpretation", formalDefinition="A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it 'clinically safe' for a human to just read the narrative." )
protected Narrative text;
/**
* The actual object that is the target of the reference (The content (narrative and data entries) associated with the section.)
* How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.
*/
protected List_ contentTarget;
@Child(name = "mode", type = {CodeType.class}, order=4, min=0, max=1)
@Description(shortDefinition="working | snapshot | changes", formalDefinition="How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted." )
protected CodeType mode;
/**
* What order applies to the items in the section entries.
*/
@Child(name = "orderedBy", type = {CodeableConcept.class}, order=5, min=0, max=1)
@Description(shortDefinition="What order the section entries are in", formalDefinition="What order applies to the items in the section entries." )
protected CodeableConcept orderedBy;
/**
* A reference to the actual resource from which the narrative in the section is derived.
*/
@Child(name = "entry", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="A reference to data that supports this section", formalDefinition="A reference to the actual resource from which the narrative in the section is derived." )
protected List<Reference> entry;
/**
* The actual objects that are the target of the reference (A reference to the actual resource from which the narrative in the section is derived.)
*/
protected List<Resource> entryTarget;
/**
* If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.
*/
@Child(name = "emptyReason", type = {CodeableConcept.class}, order=7, min=0, max=1)
@Description(shortDefinition="Why the section is empty", formalDefinition="If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason." )
protected CodeableConcept emptyReason;
/**
* A nested sub-section within this section.
*/
@Child(name = "section", type = {SectionComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED)
@Child(name = "section", type = {SectionComponent.class}, order=8, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Nested Section", formalDefinition="A nested sub-section within this section." )
protected List<SectionComponent> section;
private static final long serialVersionUID = -1683518435L;
private static final long serialVersionUID = -726390626L;
/*
* Constructor
@ -807,46 +835,172 @@ public class Composition extends DomainResource {
}
/**
* @return {@link #content} (The content (narrative and data entries) associated with the section.)
* @return {@link #text} (A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.)
*/
public Reference getContent() {
if (this.content == null)
public Narrative getText() {
if (this.text == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SectionComponent.content");
throw new Error("Attempt to auto-create SectionComponent.text");
else if (Configuration.doAutoCreate())
this.content = new Reference(); // cc
return this.content;
this.text = new Narrative(); // cc
return this.text;
}
public boolean hasContent() {
return this.content != null && !this.content.isEmpty();
public boolean hasText() {
return this.text != null && !this.text.isEmpty();
}
/**
* @param value {@link #content} (The content (narrative and data entries) associated with the section.)
* @param value {@link #text} (A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.)
*/
public SectionComponent setContent(Reference value) {
this.content = value;
public SectionComponent setText(Narrative value) {
this.text = value;
return this;
}
/**
* @return {@link #content} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The content (narrative and data entries) associated with the section.)
* @return {@link #mode} (How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
*/
public List_ getContentTarget() {
if (this.contentTarget == null)
public CodeType getModeElement() {
if (this.mode == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SectionComponent.content");
throw new Error("Attempt to auto-create SectionComponent.mode");
else if (Configuration.doAutoCreate())
this.contentTarget = new List_(); // aa
return this.contentTarget;
this.mode = new CodeType(); // bb
return this.mode;
}
public boolean hasModeElement() {
return this.mode != null && !this.mode.isEmpty();
}
public boolean hasMode() {
return this.mode != null && !this.mode.isEmpty();
}
/**
* @param value {@link #content} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The content (narrative and data entries) associated with the section.)
* @param value {@link #mode} (How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
*/
public SectionComponent setContentTarget(List_ value) {
this.contentTarget = value;
public SectionComponent setModeElement(CodeType value) {
this.mode = value;
return this;
}
/**
* @return How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.
*/
public String getMode() {
return this.mode == null ? null : this.mode.getValue();
}
/**
* @param value How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.
*/
public SectionComponent setMode(String value) {
if (Utilities.noString(value))
this.mode = null;
else {
if (this.mode == null)
this.mode = new CodeType();
this.mode.setValue(value);
}
return this;
}
/**
* @return {@link #orderedBy} (What order applies to the items in the section entries.)
*/
public CodeableConcept getOrderedBy() {
if (this.orderedBy == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SectionComponent.orderedBy");
else if (Configuration.doAutoCreate())
this.orderedBy = new CodeableConcept(); // cc
return this.orderedBy;
}
public boolean hasOrderedBy() {
return this.orderedBy != null && !this.orderedBy.isEmpty();
}
/**
* @param value {@link #orderedBy} (What order applies to the items in the section entries.)
*/
public SectionComponent setOrderedBy(CodeableConcept value) {
this.orderedBy = value;
return this;
}
/**
* @return {@link #entry} (A reference to the actual resource from which the narrative in the section is derived.)
*/
public List<Reference> getEntry() {
if (this.entry == null)
this.entry = new ArrayList<Reference>();
return this.entry;
}
public boolean hasEntry() {
if (this.entry == null)
return false;
for (Reference item : this.entry)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #entry} (A reference to the actual resource from which the narrative in the section is derived.)
*/
// syntactic sugar
public Reference addEntry() { //3
Reference t = new Reference();
if (this.entry == null)
this.entry = new ArrayList<Reference>();
this.entry.add(t);
return t;
}
// syntactic sugar
public SectionComponent addEntry(Reference t) { //3
if (t == null)
return this;
if (this.entry == null)
this.entry = new ArrayList<Reference>();
this.entry.add(t);
return this;
}
/**
* @return {@link #entry} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A reference to the actual resource from which the narrative in the section is derived.)
*/
public List<Resource> getEntryTarget() {
if (this.entryTarget == null)
this.entryTarget = new ArrayList<Resource>();
return this.entryTarget;
}
/**
* @return {@link #emptyReason} (If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.)
*/
public CodeableConcept getEmptyReason() {
if (this.emptyReason == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SectionComponent.emptyReason");
else if (Configuration.doAutoCreate())
this.emptyReason = new CodeableConcept(); // cc
return this.emptyReason;
}
public boolean hasEmptyReason() {
return this.emptyReason != null && !this.emptyReason.isEmpty();
}
/**
* @param value {@link #emptyReason} (If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.)
*/
public SectionComponent setEmptyReason(CodeableConcept value) {
this.emptyReason = value;
return this;
}
@ -894,7 +1048,11 @@ public class Composition extends DomainResource {
super.listChildren(childrenList);
childrenList.add(new Property("title", "string", "The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.", 0, java.lang.Integer.MAX_VALUE, title));
childrenList.add(new Property("code", "CodeableConcept", "A code identifying the kind of content contained within the section. This must be consistent with the section title.", 0, java.lang.Integer.MAX_VALUE, code));
childrenList.add(new Property("content", "Reference(List)", "The content (narrative and data entries) associated with the section.", 0, java.lang.Integer.MAX_VALUE, content));
childrenList.add(new Property("text", "Narrative", "A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it 'clinically safe' for a human to just read the narrative.", 0, java.lang.Integer.MAX_VALUE, text));
childrenList.add(new Property("mode", "code", "How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.", 0, java.lang.Integer.MAX_VALUE, mode));
childrenList.add(new Property("orderedBy", "CodeableConcept", "What order applies to the items in the section entries.", 0, java.lang.Integer.MAX_VALUE, orderedBy));
childrenList.add(new Property("entry", "Reference(Any)", "A reference to the actual resource from which the narrative in the section is derived.", 0, java.lang.Integer.MAX_VALUE, entry));
childrenList.add(new Property("emptyReason", "CodeableConcept", "If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.", 0, java.lang.Integer.MAX_VALUE, emptyReason));
childrenList.add(new Property("section", "@Composition.section", "A nested sub-section within this section.", 0, java.lang.Integer.MAX_VALUE, section));
}
@ -903,7 +1061,15 @@ public class Composition extends DomainResource {
copyValues(dst);
dst.title = title == null ? null : title.copy();
dst.code = code == null ? null : code.copy();
dst.content = content == null ? null : content.copy();
dst.text = text == null ? null : text.copy();
dst.mode = mode == null ? null : mode.copy();
dst.orderedBy = orderedBy == null ? null : orderedBy.copy();
if (entry != null) {
dst.entry = new ArrayList<Reference>();
for (Reference i : entry)
dst.entry.add(i.copy());
};
dst.emptyReason = emptyReason == null ? null : emptyReason.copy();
if (section != null) {
dst.section = new ArrayList<SectionComponent>();
for (SectionComponent i : section)
@ -919,8 +1085,9 @@ public class Composition extends DomainResource {
if (!(other instanceof SectionComponent))
return false;
SectionComponent o = (SectionComponent) other;
return compareDeep(title, o.title, true) && compareDeep(code, o.code, true) && compareDeep(content, o.content, true)
&& compareDeep(section, o.section, true);
return compareDeep(title, o.title, true) && compareDeep(code, o.code, true) && compareDeep(text, o.text, true)
&& compareDeep(mode, o.mode, true) && compareDeep(orderedBy, o.orderedBy, true) && compareDeep(entry, o.entry, true)
&& compareDeep(emptyReason, o.emptyReason, true) && compareDeep(section, o.section, true);
}
@Override
@ -930,12 +1097,14 @@ public class Composition extends DomainResource {
if (!(other instanceof SectionComponent))
return false;
SectionComponent o = (SectionComponent) other;
return compareValues(title, o.title, true);
return compareValues(title, o.title, true) && compareValues(mode, o.mode, true);
}
public boolean isEmpty() {
return super.isEmpty() && (title == null || title.isEmpty()) && (code == null || code.isEmpty())
&& (content == null || content.isEmpty()) && (section == null || section.isEmpty());
&& (text == null || text.isEmpty()) && (mode == null || mode.isEmpty()) && (orderedBy == null || orderedBy.isEmpty())
&& (entry == null || entry.isEmpty()) && (emptyReason == null || emptyReason.isEmpty()) && (section == null || section.isEmpty())
;
}
}
@ -1744,9 +1913,7 @@ public class Composition extends DomainResource {
public static final String SP_AUTHOR = "author";
@SearchParamDefinition(name="confidentiality", path="Composition.confidentiality", description="As defined by affinity domain", type="token" )
public static final String SP_CONFIDENTIALITY = "confidentiality";
@SearchParamDefinition(name="section-code", path="Composition.section.code", description="Classification of section (recommended)", type="token" )
public static final String SP_SECTIONCODE = "section-code";
@SearchParamDefinition(name="section", path="Composition.section.content", description="The Content of the section (narrative + data entries)", type="reference" )
@SearchParamDefinition(name="section", path="Composition.section.code", description="Classification of section (recommended)", type="token" )
public static final String SP_SECTION = "section";
@SearchParamDefinition(name="encounter", path="Composition.encounter", description="Context of the conposition", type="reference" )
public static final String SP_ENCOUNTER = "encounter";
@ -1756,6 +1923,8 @@ public class Composition extends DomainResource {
public static final String SP_TITLE = "title";
@SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference" )
public static final String SP_ATTESTER = "attester";
@SearchParamDefinition(name="entry", path="Composition.section.entry", description="A reference to data that supports this section", type="reference" )
public static final String SP_ENTRY = "entry";
@SearchParamDefinition(name="patient", path="Composition.subject", description="Who and/or what the composition is about", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="context", path="Composition.event.code", description="Code(s) that apply to the event being documented", type="token" )

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -1041,10 +1041,10 @@ public class ConceptMap extends DomainResource {
}
/**
* An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:).
* An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.
*/
@Child(name = "url", type = {UriType.class}, order=0, min=0, max=1)
@Description(shortDefinition="Globally unique logical id for concept map", formalDefinition="An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:)." )
@Description(shortDefinition="Globally unique logical id for concept map", formalDefinition="An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published." )
protected UriType url;
/**
@ -1068,69 +1068,69 @@ public class ConceptMap extends DomainResource {
@Description(shortDefinition="Informal name for this concept map", formalDefinition="A free text natural language name describing the concept map." )
protected StringType name;
/**
* The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps.
*/
@Child(name = "useContext", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps." )
protected List<CodeableConcept> useContext;
/**
* The name of the individual or organization that published the concept map.
*/
@Child(name = "publisher", type = {StringType.class}, order=5, min=0, max=1)
@Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the concept map." )
protected StringType publisher;
/**
* Contacts to assist a user in finding and communicating with the publisher.
*/
@Child(name = "contact", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." )
protected List<ConceptMapContactComponent> contact;
/**
* A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.
*/
@Child(name = "description", type = {StringType.class}, order=7, min=0, max=1)
@Description(shortDefinition="Human language description of the concept map", formalDefinition="A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc." )
protected StringType description;
/**
* Explains why this concept map is needed and why it's been constrained as it has.
*/
@Child(name = "requirements", type = {StringType.class}, order=8, min=0, max=1)
@Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this concept map is needed and why it's been constrained as it has." )
protected StringType requirements;
/**
* A copyright statement relating to the concept map and/or its contents.
*/
@Child(name = "copyright", type = {StringType.class}, order=9, min=0, max=1)
@Description(shortDefinition="Use and/or Publishing restrictions", formalDefinition="A copyright statement relating to the concept map and/or its contents." )
protected StringType copyright;
/**
* The status of the concept map.
*/
@Child(name = "status", type = {CodeType.class}, order=10, min=1, max=1)
@Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1)
@Description(shortDefinition="draft | active | retired", formalDefinition="The status of the concept map." )
protected Enumeration<ConformanceResourceStatus> status;
/**
* This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
*/
@Child(name = "experimental", type = {BooleanType.class}, order=11, min=0, max=1)
@Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1)
@Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." )
protected BooleanType experimental;
/**
* The date that the concept map status was last changed.
* The name of the individual or organization that published the concept map.
*/
@Child(name = "date", type = {DateTimeType.class}, order=12, min=0, max=1)
@Description(shortDefinition="Date for given status", formalDefinition="The date that the concept map status was last changed." )
@Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1)
@Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the concept map." )
protected StringType publisher;
/**
* Contacts to assist a user in finding and communicating with the publisher.
*/
@Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." )
protected List<ConceptMapContactComponent> contact;
/**
* The date that this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the concept map changes.
*/
@Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1)
@Description(shortDefinition="Date for given status", formalDefinition="The date that this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the concept map changes." )
protected DateTimeType date;
/**
* A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.
*/
@Child(name = "description", type = {StringType.class}, order=9, min=0, max=1)
@Description(shortDefinition="Human language description of the concept map", formalDefinition="A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc." )
protected StringType description;
/**
* The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps.
*/
@Child(name = "useContext", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps." )
protected List<CodeableConcept> useContext;
/**
* Explains why this concept map is needed and why it's been constrained as it has.
*/
@Child(name = "requirements", type = {StringType.class}, order=11, min=0, max=1)
@Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this concept map is needed and why it's been constrained as it has." )
protected StringType requirements;
/**
* A copyright statement relating to the concept map and/or its contents.
*/
@Child(name = "copyright", type = {StringType.class}, order=12, min=0, max=1)
@Description(shortDefinition="Use and/or Publishing restrictions", formalDefinition="A copyright statement relating to the concept map and/or its contents." )
protected StringType copyright;
/**
* The source value set that specifies the concepts that are being mapped.
*/
@ -1152,7 +1152,7 @@ public class ConceptMap extends DomainResource {
@Description(shortDefinition="Mappings for a concept from the source set", formalDefinition="Mappings for an individual concept in the source to one or more concepts in the target." )
protected List<SourceElementComponent> element;
private static final long serialVersionUID = -1713063390L;
private static final long serialVersionUID = 1687563642L;
/*
* Constructor
@ -1172,7 +1172,7 @@ public class ConceptMap extends DomainResource {
}
/**
* @return {@link #url} (An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
* @return {@link #url} (An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
*/
public UriType getUrlElement() {
if (this.url == null)
@ -1192,7 +1192,7 @@ public class ConceptMap extends DomainResource {
}
/**
* @param value {@link #url} (An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
* @param value {@link #url} (An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
*/
public ConceptMap setUrlElement(UriType value) {
this.url = value;
@ -1200,14 +1200,14 @@ public class ConceptMap extends DomainResource {
}
/**
* @return An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:).
* @return An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.
*/
public String getUrl() {
return this.url == null ? null : this.url.getValue();
}
/**
* @param value An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:).
* @param value An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.
*/
public ConceptMap setUrl(String value) {
if (Utilities.noString(value))
@ -1343,42 +1343,92 @@ public class ConceptMap extends DomainResource {
}
/**
* @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps.)
* @return {@link #status} (The status of the concept map.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
*/
public List<CodeableConcept> getUseContext() {
if (this.useContext == null)
this.useContext = new ArrayList<CodeableConcept>();
return this.useContext;
public Enumeration<ConformanceResourceStatus> getStatusElement() {
if (this.status == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ConceptMap.status");
else if (Configuration.doAutoCreate())
this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); // bb
return this.status;
}
public boolean hasUseContext() {
if (this.useContext == null)
return false;
for (CodeableConcept item : this.useContext)
if (!item.isEmpty())
return true;
return false;
public boolean hasStatusElement() {
return this.status != null && !this.status.isEmpty();
}
public boolean hasStatus() {
return this.status != null && !this.status.isEmpty();
}
/**
* @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps.)
* @param value {@link #status} (The status of the concept map.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
*/
// syntactic sugar
public CodeableConcept addUseContext() { //3
CodeableConcept t = new CodeableConcept();
if (this.useContext == null)
this.useContext = new ArrayList<CodeableConcept>();
this.useContext.add(t);
return t;
public ConceptMap setStatusElement(Enumeration<ConformanceResourceStatus> value) {
this.status = value;
return this;
}
// syntactic sugar
public ConceptMap addUseContext(CodeableConcept t) { //3
if (t == null)
return this;
if (this.useContext == null)
this.useContext = new ArrayList<CodeableConcept>();
this.useContext.add(t);
/**
* @return The status of the concept map.
*/
public ConformanceResourceStatus getStatus() {
return this.status == null ? null : this.status.getValue();
}
/**
* @param value The status of the concept map.
*/
public ConceptMap setStatus(ConformanceResourceStatus value) {
if (this.status == null)
this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory());
this.status.setValue(value);
return this;
}
/**
* @return {@link #experimental} (This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
*/
public BooleanType getExperimentalElement() {
if (this.experimental == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ConceptMap.experimental");
else if (Configuration.doAutoCreate())
this.experimental = new BooleanType(); // bb
return this.experimental;
}
public boolean hasExperimentalElement() {
return this.experimental != null && !this.experimental.isEmpty();
}
public boolean hasExperimental() {
return this.experimental != null && !this.experimental.isEmpty();
}
/**
* @param value {@link #experimental} (This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
*/
public ConceptMap setExperimentalElement(BooleanType value) {
this.experimental = value;
return this;
}
/**
* @return This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
*/
public boolean getExperimental() {
return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
}
/**
* @param value This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
*/
public ConceptMap setExperimental(boolean value) {
if (this.experimental == null)
this.experimental = new BooleanType();
this.experimental.setValue(value);
return this;
}
@ -1471,6 +1521,55 @@ public class ConceptMap extends DomainResource {
return this;
}
/**
* @return {@link #date} (The date that this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the concept map changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
public DateTimeType getDateElement() {
if (this.date == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ConceptMap.date");
else if (Configuration.doAutoCreate())
this.date = new DateTimeType(); // bb
return this.date;
}
public boolean hasDateElement() {
return this.date != null && !this.date.isEmpty();
}
public boolean hasDate() {
return this.date != null && !this.date.isEmpty();
}
/**
* @param value {@link #date} (The date that this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the concept map changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
public ConceptMap setDateElement(DateTimeType value) {
this.date = value;
return this;
}
/**
* @return The date that this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the concept map changes.
*/
public Date getDate() {
return this.date == null ? null : this.date.getValue();
}
/**
* @param value The date that this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the concept map changes.
*/
public ConceptMap setDate(Date value) {
if (value == null)
this.date = null;
else {
if (this.date == null)
this.date = new DateTimeType();
this.date.setValue(value);
}
return this;
}
/**
* @return {@link #description} (A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
*/
@ -1520,6 +1619,46 @@ public class ConceptMap extends DomainResource {
return this;
}
/**
* @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps.)
*/
public List<CodeableConcept> getUseContext() {
if (this.useContext == null)
this.useContext = new ArrayList<CodeableConcept>();
return this.useContext;
}
public boolean hasUseContext() {
if (this.useContext == null)
return false;
for (CodeableConcept item : this.useContext)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps.)
*/
// syntactic sugar
public CodeableConcept addUseContext() { //3
CodeableConcept t = new CodeableConcept();
if (this.useContext == null)
this.useContext = new ArrayList<CodeableConcept>();
this.useContext.add(t);
return t;
}
// syntactic sugar
public ConceptMap addUseContext(CodeableConcept t) { //3
if (t == null)
return this;
if (this.useContext == null)
this.useContext = new ArrayList<CodeableConcept>();
this.useContext.add(t);
return this;
}
/**
* @return {@link #requirements} (Explains why this concept map is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value
*/
@ -1618,145 +1757,6 @@ public class ConceptMap extends DomainResource {
return this;
}
/**
* @return {@link #status} (The status of the concept map.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
*/
public Enumeration<ConformanceResourceStatus> getStatusElement() {
if (this.status == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ConceptMap.status");
else if (Configuration.doAutoCreate())
this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); // bb
return this.status;
}
public boolean hasStatusElement() {
return this.status != null && !this.status.isEmpty();
}
public boolean hasStatus() {
return this.status != null && !this.status.isEmpty();
}
/**
* @param value {@link #status} (The status of the concept map.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
*/
public ConceptMap setStatusElement(Enumeration<ConformanceResourceStatus> value) {
this.status = value;
return this;
}
/**
* @return The status of the concept map.
*/
public ConformanceResourceStatus getStatus() {
return this.status == null ? null : this.status.getValue();
}
/**
* @param value The status of the concept map.
*/
public ConceptMap setStatus(ConformanceResourceStatus value) {
if (this.status == null)
this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory());
this.status.setValue(value);
return this;
}
/**
* @return {@link #experimental} (This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
*/
public BooleanType getExperimentalElement() {
if (this.experimental == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ConceptMap.experimental");
else if (Configuration.doAutoCreate())
this.experimental = new BooleanType(); // bb
return this.experimental;
}
public boolean hasExperimentalElement() {
return this.experimental != null && !this.experimental.isEmpty();
}
public boolean hasExperimental() {
return this.experimental != null && !this.experimental.isEmpty();
}
/**
* @param value {@link #experimental} (This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
*/
public ConceptMap setExperimentalElement(BooleanType value) {
this.experimental = value;
return this;
}
/**
* @return This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
*/
public boolean getExperimental() {
return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
}
/**
* @param value This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
*/
public ConceptMap setExperimental(boolean value) {
if (this.experimental == null)
this.experimental = new BooleanType();
this.experimental.setValue(value);
return this;
}
/**
* @return {@link #date} (The date that the concept map status was last changed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
public DateTimeType getDateElement() {
if (this.date == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ConceptMap.date");
else if (Configuration.doAutoCreate())
this.date = new DateTimeType(); // bb
return this.date;
}
public boolean hasDateElement() {
return this.date != null && !this.date.isEmpty();
}
public boolean hasDate() {
return this.date != null && !this.date.isEmpty();
}
/**
* @param value {@link #date} (The date that the concept map status was last changed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
public ConceptMap setDateElement(DateTimeType value) {
this.date = value;
return this;
}
/**
* @return The date that the concept map status was last changed.
*/
public Date getDate() {
return this.date == null ? null : this.date.getValue();
}
/**
* @param value The date that the concept map status was last changed.
*/
public ConceptMap setDate(Date value) {
if (value == null)
this.date = null;
else {
if (this.date == null)
this.date = new DateTimeType();
this.date.setValue(value);
}
return this;
}
/**
* @return {@link #source} (The source value set that specifies the concepts that are being mapped.)
*/
@ -1889,19 +1889,19 @@ public class ConceptMap extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("url", "uri", "An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:).", 0, java.lang.Integer.MAX_VALUE, url));
childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url));
childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.", 0, java.lang.Integer.MAX_VALUE, version));
childrenList.add(new Property("name", "string", "A free text natural language name describing the concept map.", 0, java.lang.Integer.MAX_VALUE, name));
childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps.", 0, java.lang.Integer.MAX_VALUE, useContext));
childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the concept map.", 0, java.lang.Integer.MAX_VALUE, publisher));
childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
childrenList.add(new Property("description", "string", "A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.", 0, java.lang.Integer.MAX_VALUE, description));
childrenList.add(new Property("requirements", "string", "Explains why this concept map is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements));
childrenList.add(new Property("copyright", "string", "A copyright statement relating to the concept map and/or its contents.", 0, java.lang.Integer.MAX_VALUE, copyright));
childrenList.add(new Property("status", "code", "The status of the concept map.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("experimental", "boolean", "This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental));
childrenList.add(new Property("date", "dateTime", "The date that the concept map status was last changed.", 0, java.lang.Integer.MAX_VALUE, date));
childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the concept map.", 0, java.lang.Integer.MAX_VALUE, publisher));
childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
childrenList.add(new Property("date", "dateTime", "The date that this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the concept map changes.", 0, java.lang.Integer.MAX_VALUE, date));
childrenList.add(new Property("description", "string", "A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.", 0, java.lang.Integer.MAX_VALUE, description));
childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps.", 0, java.lang.Integer.MAX_VALUE, useContext));
childrenList.add(new Property("requirements", "string", "Explains why this concept map is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements));
childrenList.add(new Property("copyright", "string", "A copyright statement relating to the concept map and/or its contents.", 0, java.lang.Integer.MAX_VALUE, copyright));
childrenList.add(new Property("source[x]", "uri|Reference(ValueSet|StructureDefinition)", "The source value set that specifies the concepts that are being mapped.", 0, java.lang.Integer.MAX_VALUE, source));
childrenList.add(new Property("target[x]", "uri|Reference(ValueSet|StructureDefinition)", "The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.", 0, java.lang.Integer.MAX_VALUE, target));
childrenList.add(new Property("element", "", "Mappings for an individual concept in the source to one or more concepts in the target.", 0, java.lang.Integer.MAX_VALUE, element));
@ -1914,23 +1914,23 @@ public class ConceptMap extends DomainResource {
dst.identifier = identifier == null ? null : identifier.copy();
dst.version = version == null ? null : version.copy();
dst.name = name == null ? null : name.copy();
if (useContext != null) {
dst.useContext = new ArrayList<CodeableConcept>();
for (CodeableConcept i : useContext)
dst.useContext.add(i.copy());
};
dst.status = status == null ? null : status.copy();
dst.experimental = experimental == null ? null : experimental.copy();
dst.publisher = publisher == null ? null : publisher.copy();
if (contact != null) {
dst.contact = new ArrayList<ConceptMapContactComponent>();
for (ConceptMapContactComponent i : contact)
dst.contact.add(i.copy());
};
dst.date = date == null ? null : date.copy();
dst.description = description == null ? null : description.copy();
if (useContext != null) {
dst.useContext = new ArrayList<CodeableConcept>();
for (CodeableConcept i : useContext)
dst.useContext.add(i.copy());
};
dst.requirements = requirements == null ? null : requirements.copy();
dst.copyright = copyright == null ? null : copyright.copy();
dst.status = status == null ? null : status.copy();
dst.experimental = experimental == null ? null : experimental.copy();
dst.date = date == null ? null : date.copy();
dst.source = source == null ? null : source.copy();
dst.target = target == null ? null : target.copy();
if (element != null) {
@ -1953,11 +1953,12 @@ public class ConceptMap extends DomainResource {
return false;
ConceptMap o = (ConceptMap) other;
return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
&& compareDeep(name, o.name, true) && compareDeep(useContext, o.useContext, true) && compareDeep(publisher, o.publisher, true)
&& compareDeep(contact, o.contact, true) && compareDeep(description, o.description, true) && compareDeep(requirements, o.requirements, true)
&& compareDeep(copyright, o.copyright, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true)
&& compareDeep(date, o.date, true) && compareDeep(source, o.source, true) && compareDeep(target, o.target, true)
&& compareDeep(element, o.element, true);
&& compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true)
&& compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true)
&& compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true)
&& compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true)
&& compareDeep(source, o.source, true) && compareDeep(target, o.target, true) && compareDeep(element, o.element, true)
;
}
@Override
@ -1968,18 +1969,18 @@ public class ConceptMap extends DomainResource {
return false;
ConceptMap o = (ConceptMap) other;
return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true)
&& compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true)
&& compareValues(copyright, o.copyright, true) && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true)
&& compareValues(date, o.date, true);
&& compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true)
&& compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true)
&& compareValues(copyright, o.copyright, true);
}
public boolean isEmpty() {
return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (useContext == null || useContext.isEmpty())
&& (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (description == null || description.isEmpty())
&& (requirements == null || requirements.isEmpty()) && (copyright == null || copyright.isEmpty())
&& (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty())
&& (date == null || date.isEmpty()) && (source == null || source.isEmpty()) && (target == null || target.isEmpty())
&& (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty())
&& (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty())
&& (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty())
&& (useContext == null || useContext.isEmpty()) && (requirements == null || requirements.isEmpty())
&& (copyright == null || copyright.isEmpty()) && (source == null || source.isEmpty()) && (target == null || target.isEmpty())
&& (element == null || element.isEmpty());
}
@ -2000,7 +2001,7 @@ public class ConceptMap extends DomainResource {
public static final String SP_DESCRIPTION = "description";
@SearchParamDefinition(name="targetsystem", path="ConceptMap.element.target.codeSystem", description="System of the target (if necessary)", type="uri" )
public static final String SP_TARGETSYSTEM = "targetsystem";
@SearchParamDefinition(name="source", path="ConceptMap.source[x]", description="The system for any concepts mapped by this concept map", type="reference" )
@SearchParamDefinition(name="source", path="ConceptMap.sourceReference", description="Identifies the source of the concepts which are being mapped", type="reference" )
public static final String SP_SOURCE = "source";
@SearchParamDefinition(name="version", path="ConceptMap.version", description="The version identifier of the concept map", type="token" )
public static final String SP_VERSION = "version";
@ -2012,6 +2013,8 @@ public class ConceptMap extends DomainResource {
public static final String SP_TARGET = "target";
@SearchParamDefinition(name="sourcecode", path="ConceptMap.element.code", description="Identifies element being mapped", type="token" )
public static final String SP_SOURCECODE = "sourcecode";
@SearchParamDefinition(name="sourceuri", path="ConceptMap.sourceUri", description="Identifies the source of the concepts which are being mapped", type="reference" )
public static final String SP_SOURCEURI = "sourceuri";
@SearchParamDefinition(name="name", path="ConceptMap.name", description="Name of the concept map", type="string" )
public static final String SP_NAME = "name";
@SearchParamDefinition(name="context", path="ConceptMap.useContext", description="A use context assigned to the concept map", type="token" )

View File

@ -29,12 +29,12 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
public class Constants {
public final static String VERSION = "0.5.0";
public final static String REVISION = "5924";
public final static String DATE = "Tue Jul 21 10:37:59 EDT 2015";
public final static String REVISION = "6166";
public final static String DATE = "Fri Aug 07 06:45:35 EDT 2015";
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -294,14 +294,21 @@ public class ContactPoint extends Type implements ICompositeType {
@Description(shortDefinition="home | work | temp | old | mobile - purpose of this contact point", formalDefinition="Identifies the purpose for the contact point." )
protected Enumeration<ContactPointUse> use;
/**
* Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.
*/
@Child(name = "rank", type = {PositiveIntType.class}, order=3, min=0, max=1)
@Description(shortDefinition="Specify preferred order of use (1 = highest)", formalDefinition="Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values." )
protected PositiveIntType rank;
/**
* Time period when the contact point was/is in use.
*/
@Child(name = "period", type = {Period.class}, order=3, min=0, max=1)
@Child(name = "period", type = {Period.class}, order=4, min=0, max=1)
@Description(shortDefinition="Time period when the contact point was/is in use", formalDefinition="Time period when the contact point was/is in use." )
protected Period period;
private static final long serialVersionUID = 1972725348L;
private static final long serialVersionUID = 1509610874L;
/*
* Constructor
@ -457,6 +464,51 @@ public class ContactPoint extends Type implements ICompositeType {
return this;
}
/**
* @return {@link #rank} (Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.). This is the underlying object with id, value and extensions. The accessor "getRank" gives direct access to the value
*/
public PositiveIntType getRankElement() {
if (this.rank == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ContactPoint.rank");
else if (Configuration.doAutoCreate())
this.rank = new PositiveIntType(); // bb
return this.rank;
}
public boolean hasRankElement() {
return this.rank != null && !this.rank.isEmpty();
}
public boolean hasRank() {
return this.rank != null && !this.rank.isEmpty();
}
/**
* @param value {@link #rank} (Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.). This is the underlying object with id, value and extensions. The accessor "getRank" gives direct access to the value
*/
public ContactPoint setRankElement(PositiveIntType value) {
this.rank = value;
return this;
}
/**
* @return Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.
*/
public int getRank() {
return this.rank == null || this.rank.isEmpty() ? 0 : this.rank.getValue();
}
/**
* @param value Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.
*/
public ContactPoint setRank(int value) {
if (this.rank == null)
this.rank = new PositiveIntType();
this.rank.setValue(value);
return this;
}
/**
* @return {@link #period} (Time period when the contact point was/is in use.)
*/
@ -486,6 +538,7 @@ public class ContactPoint extends Type implements ICompositeType {
childrenList.add(new Property("system", "code", "Telecommunications form for contact point - what communications system is required to make use of the contact.", 0, java.lang.Integer.MAX_VALUE, system));
childrenList.add(new Property("value", "string", "The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).", 0, java.lang.Integer.MAX_VALUE, value));
childrenList.add(new Property("use", "code", "Identifies the purpose for the contact point.", 0, java.lang.Integer.MAX_VALUE, use));
childrenList.add(new Property("rank", "positiveInt", "Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.", 0, java.lang.Integer.MAX_VALUE, rank));
childrenList.add(new Property("period", "Period", "Time period when the contact point was/is in use.", 0, java.lang.Integer.MAX_VALUE, period));
}
@ -495,6 +548,7 @@ public class ContactPoint extends Type implements ICompositeType {
dst.system = system == null ? null : system.copy();
dst.value = value == null ? null : value.copy();
dst.use = use == null ? null : use.copy();
dst.rank = rank == null ? null : rank.copy();
dst.period = period == null ? null : period.copy();
return dst;
}
@ -511,7 +565,7 @@ public class ContactPoint extends Type implements ICompositeType {
return false;
ContactPoint o = (ContactPoint) other;
return compareDeep(system, o.system, true) && compareDeep(value, o.value, true) && compareDeep(use, o.use, true)
&& compareDeep(period, o.period, true);
&& compareDeep(rank, o.rank, true) && compareDeep(period, o.period, true);
}
@Override
@ -522,12 +576,13 @@ public class ContactPoint extends Type implements ICompositeType {
return false;
ContactPoint o = (ContactPoint) other;
return compareValues(system, o.system, true) && compareValues(value, o.value, true) && compareValues(use, o.use, true)
;
&& compareValues(rank, o.rank, true);
}
public boolean isEmpty() {
return super.isEmpty() && (system == null || system.isEmpty()) && (value == null || value.isEmpty())
&& (use == null || use.isEmpty()) && (period == null || period.isEmpty());
&& (use == null || use.isEmpty()) && (rank == null || rank.isEmpty()) && (period == null || period.isEmpty())
;
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -52,7 +52,7 @@ public class Contract extends DomainResource {
/**
* Who or what actors are assigned roles in this Contract.
*/
@Child(name = "entity", type = {Contract.class, Device.class, Group.class, Location.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Substance.class, Supply.class}, order=1, min=1, max=1)
@Child(name = "entity", type = {Contract.class, Device.class, Group.class, Location.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Substance.class}, order=1, min=1, max=1)
@Description(shortDefinition="Contract Actor Type", formalDefinition="Who or what actors are assigned roles in this Contract." )
protected Reference entity;
@ -166,7 +166,7 @@ public class Contract extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("entity", "Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance|Supply)", "Who or what actors are assigned roles in this Contract.", 0, java.lang.Integer.MAX_VALUE, entity));
childrenList.add(new Property("entity", "Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance)", "Who or what actors are assigned roles in this Contract.", 0, java.lang.Integer.MAX_VALUE, entity));
childrenList.add(new Property("role", "CodeableConcept", "Role type of actors assigned roles in this Contract.", 0, java.lang.Integer.MAX_VALUE, role));
}
@ -1447,7 +1447,7 @@ public class Contract extends DomainResource {
/**
* The actor assigned a role in this Contract Provision.
*/
@Child(name = "entity", type = {Contract.class, Device.class, Group.class, Location.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Substance.class, Supply.class}, order=1, min=1, max=1)
@Child(name = "entity", type = {Contract.class, Device.class, Group.class, Location.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Substance.class}, order=1, min=1, max=1)
@Description(shortDefinition="Contract Term Actor", formalDefinition="The actor assigned a role in this Contract Provision." )
protected Reference entity;
@ -1561,7 +1561,7 @@ public class Contract extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("entity", "Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance|Supply)", "The actor assigned a role in this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, entity));
childrenList.add(new Property("entity", "Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance)", "The actor assigned a role in this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, entity));
childrenList.add(new Property("role", "CodeableConcept", "Role played by the actor assigned this role in this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, role));
}
@ -2022,7 +2022,7 @@ public class Contract extends DomainResource {
/**
* Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.
*/
@Child(name = "content", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireAnswers.class}, order=1, min=1, max=1)
@Child(name = "content", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=1, min=1, max=1)
@Description(shortDefinition="Easily comprehended representation of this Contract", formalDefinition="Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability." )
protected Type content;
@ -2090,7 +2090,7 @@ public class Contract extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireAnswers)", "Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.", 0, java.lang.Integer.MAX_VALUE, content));
childrenList.add(new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.", 0, java.lang.Integer.MAX_VALUE, content));
}
public FriendlyLanguageComponent copy() {
@ -2131,7 +2131,7 @@ public class Contract extends DomainResource {
/**
* Contract legal text in human renderable form.
*/
@Child(name = "content", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireAnswers.class}, order=1, min=1, max=1)
@Child(name = "content", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=1, min=1, max=1)
@Description(shortDefinition="Contract Legal Text", formalDefinition="Contract legal text in human renderable form." )
protected Type content;
@ -2199,7 +2199,7 @@ public class Contract extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireAnswers)", "Contract legal text in human renderable form.", 0, java.lang.Integer.MAX_VALUE, content));
childrenList.add(new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Contract legal text in human renderable form.", 0, java.lang.Integer.MAX_VALUE, content));
}
public LegalLanguageComponent copy() {
@ -2460,7 +2460,7 @@ public class Contract extends DomainResource {
/**
* Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.
*/
@Child(name = "binding", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireAnswers.class}, order=14, min=0, max=1)
@Child(name = "binding", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=14, min=0, max=1)
@Description(shortDefinition="Binding Contract", formalDefinition="Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract." )
protected Type binding;
@ -3247,7 +3247,7 @@ public class Contract extends DomainResource {
childrenList.add(new Property("valuedItem", "", "Contract Valued Item List.", 0, java.lang.Integer.MAX_VALUE, valuedItem));
childrenList.add(new Property("signer", "", "Party signing this Contract.", 0, java.lang.Integer.MAX_VALUE, signer));
childrenList.add(new Property("term", "", "One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.", 0, java.lang.Integer.MAX_VALUE, term));
childrenList.add(new Property("binding[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireAnswers)", "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", 0, java.lang.Integer.MAX_VALUE, binding));
childrenList.add(new Property("binding[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", 0, java.lang.Integer.MAX_VALUE, binding));
childrenList.add(new Property("friendly", "", "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", 0, java.lang.Integer.MAX_VALUE, friendly));
childrenList.add(new Property("legal", "", "List of Legal expressions or representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, legal));
childrenList.add(new Property("rule", "", "List of Computable Policy Rule Language Representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, rule));

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import org.hl7.fhir.instance.model.annotations.DatatypeDef;
import org.hl7.fhir.instance.model.annotations.Block;
@ -40,14 +40,14 @@ import org.hl7.fhir.instance.model.api.*;
@DatatypeDef(name="Count")
public class Count extends Quantity {
private static final long serialVersionUID = -483422721L;
private static final long serialVersionUID = 1069574054L;
public Count copy() {
Count dst = new Count();
copyValues(dst);
dst.value = value == null ? null : value.copy();
dst.comparator = comparator == null ? null : comparator.copy();
dst.units = units == null ? null : units.copy();
dst.unit = unit == null ? null : unit.copy();
dst.system = system == null ? null : system.copy();
dst.code = code == null ? null : code.copy();
return dst;
@ -64,7 +64,7 @@ public class Count extends Quantity {
if (!(other instanceof Count))
return false;
Count o = (Count) other;
return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(units, o.units, true)
return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(unit, o.unit, true)
&& compareDeep(system, o.system, true) && compareDeep(code, o.code, true);
}
@ -75,13 +75,13 @@ public class Count extends Quantity {
if (!(other instanceof Count))
return false;
Count o = (Count) other;
return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(units, o.units, true)
return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(unit, o.unit, true)
&& compareValues(system, o.system, true) && compareValues(code, o.code, true);
}
public boolean isEmpty() {
return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
&& (units == null || units.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
&& (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -47,7 +47,7 @@ import org.hl7.fhir.instance.model.api.*;
@ResourceDef(name="DataElement", profile="http://hl7.org/fhir/Profile/DataElement")
public class DataElement extends DomainResource {
public enum DataElementSpecificity {
public enum DataElementStringency {
/**
* The data element is sufficiently well-constrained that multiple pieces of data captured according to the constraints of the data element will be comparable (though in some cases, a degree of automated conversion/normalization may be required).
*/
@ -76,7 +76,7 @@ public class DataElement extends DomainResource {
* added to help the parsers
*/
NULL;
public static DataElementSpecificity fromCode(String codeString) throws Exception {
public static DataElementStringency fromCode(String codeString) throws Exception {
if (codeString == null || "".equals(codeString))
return null;
if ("comparable".equals(codeString))
@ -91,7 +91,7 @@ public class DataElement extends DomainResource {
return SCALEABLE;
if ("flexible".equals(codeString))
return FLEXIBLE;
throw new Exception("Unknown DataElementSpecificity code '"+codeString+"'");
throw new Exception("Unknown DataElementStringency code '"+codeString+"'");
}
public String toCode() {
switch (this) {
@ -106,12 +106,12 @@ public class DataElement extends DomainResource {
}
public String getSystem() {
switch (this) {
case COMPARABLE: return "http://hl7.org/fhir/dataelement-specificity";
case FULLYSPECIFIED: return "http://hl7.org/fhir/dataelement-specificity";
case EQUIVALENT: return "http://hl7.org/fhir/dataelement-specificity";
case CONVERTABLE: return "http://hl7.org/fhir/dataelement-specificity";
case SCALEABLE: return "http://hl7.org/fhir/dataelement-specificity";
case FLEXIBLE: return "http://hl7.org/fhir/dataelement-specificity";
case COMPARABLE: return "http://hl7.org/fhir/dataelement-stringency";
case FULLYSPECIFIED: return "http://hl7.org/fhir/dataelement-stringency";
case EQUIVALENT: return "http://hl7.org/fhir/dataelement-stringency";
case CONVERTABLE: return "http://hl7.org/fhir/dataelement-stringency";
case SCALEABLE: return "http://hl7.org/fhir/dataelement-stringency";
case FLEXIBLE: return "http://hl7.org/fhir/dataelement-stringency";
default: return "?";
}
}
@ -139,37 +139,37 @@ public class DataElement extends DomainResource {
}
}
public static class DataElementSpecificityEnumFactory implements EnumFactory<DataElementSpecificity> {
public DataElementSpecificity fromCode(String codeString) throws IllegalArgumentException {
public static class DataElementStringencyEnumFactory implements EnumFactory<DataElementStringency> {
public DataElementStringency fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString))
return null;
if ("comparable".equals(codeString))
return DataElementSpecificity.COMPARABLE;
return DataElementStringency.COMPARABLE;
if ("fully-specified".equals(codeString))
return DataElementSpecificity.FULLYSPECIFIED;
return DataElementStringency.FULLYSPECIFIED;
if ("equivalent".equals(codeString))
return DataElementSpecificity.EQUIVALENT;
return DataElementStringency.EQUIVALENT;
if ("convertable".equals(codeString))
return DataElementSpecificity.CONVERTABLE;
return DataElementStringency.CONVERTABLE;
if ("scaleable".equals(codeString))
return DataElementSpecificity.SCALEABLE;
return DataElementStringency.SCALEABLE;
if ("flexible".equals(codeString))
return DataElementSpecificity.FLEXIBLE;
throw new IllegalArgumentException("Unknown DataElementSpecificity code '"+codeString+"'");
return DataElementStringency.FLEXIBLE;
throw new IllegalArgumentException("Unknown DataElementStringency code '"+codeString+"'");
}
public String toCode(DataElementSpecificity code) {
if (code == DataElementSpecificity.COMPARABLE)
public String toCode(DataElementStringency code) {
if (code == DataElementStringency.COMPARABLE)
return "comparable";
if (code == DataElementSpecificity.FULLYSPECIFIED)
if (code == DataElementStringency.FULLYSPECIFIED)
return "fully-specified";
if (code == DataElementSpecificity.EQUIVALENT)
if (code == DataElementStringency.EQUIVALENT)
return "equivalent";
if (code == DataElementSpecificity.CONVERTABLE)
if (code == DataElementStringency.CONVERTABLE)
return "convertable";
if (code == DataElementSpecificity.SCALEABLE)
if (code == DataElementStringency.SCALEABLE)
return "scaleable";
if (code == DataElementSpecificity.FLEXIBLE)
if (code == DataElementStringency.FLEXIBLE)
return "flexible";
return "?";
}
@ -621,18 +621,18 @@ public class DataElement extends DomainResource {
}
/**
* An absolute uri that is used to identify this element when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:).
* An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.
*/
@Child(name = "url", type = {UriType.class}, order=0, min=0, max=1)
@Description(shortDefinition="Globally unique logical id for data element", formalDefinition="An absolute uri that is used to identify this element when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:)." )
@Description(shortDefinition="Globally unique logical id for data element", formalDefinition="An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published." )
protected UriType url;
/**
* Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.
*/
@Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1)
@Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Logical id to reference this data element", formalDefinition="Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance." )
protected Identifier identifier;
protected List<Identifier> identifier;
/**
* The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.
@ -649,11 +649,11 @@ public class DataElement extends DomainResource {
protected StringType name;
/**
* The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.
* The status of the data element.
*/
@Child(name = "useContext", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions." )
protected List<CodeableConcept> useContext;
@Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1)
@Description(shortDefinition="draft | active | retired", formalDefinition="The status of the data element." )
protected Enumeration<ConformanceResourceStatus> status;
/**
* A flag to indicate that this search data elemnt definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
@ -662,47 +662,47 @@ public class DataElement extends DomainResource {
@Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="A flag to indicate that this search data elemnt definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." )
protected BooleanType experimental;
/**
* The status of the data element.
*/
@Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1)
@Description(shortDefinition="draft | active | retired", formalDefinition="The status of the data element." )
protected Enumeration<ConformanceResourceStatus> status;
/**
* The date that the status for this business version of the data element became effective. (I.e. Date the draft was created, date element became active or date element became retired).
*/
@Child(name = "date", type = {DateTimeType.class}, order=7, min=0, max=1)
@Description(shortDefinition="Date for this version of the data element", formalDefinition="The date that the status for this business version of the data element became effective. (I.e. Date the draft was created, date element became active or date element became retired)." )
protected DateTimeType date;
/**
* A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.
*/
@Child(name = "copyright", type = {StringType.class}, order=8, min=0, max=1)
@Description(shortDefinition="Use and/or Publishing restrictions", formalDefinition="A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element." )
protected StringType copyright;
/**
* The name of the individual or organization that published the data element.
*/
@Child(name = "publisher", type = {StringType.class}, order=9, min=0, max=1)
@Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1)
@Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the data element." )
protected StringType publisher;
/**
* Contacts to assist a user in finding and communicating with the publisher.
*/
@Child(name = "contact", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED)
@Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." )
protected List<DataElementContactComponent> contact;
/**
* The date that this version of the Data Element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the data element changes.
*/
@Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1)
@Description(shortDefinition="Date for this version of the data element", formalDefinition="The date that this version of the Data Element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the data element changes." )
protected DateTimeType date;
/**
* The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.
*/
@Child(name = "useContext", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions." )
protected List<CodeableConcept> useContext;
/**
* A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.
*/
@Child(name = "copyright", type = {StringType.class}, order=10, min=0, max=1)
@Description(shortDefinition="Use and/or Publishing restrictions", formalDefinition="A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element." )
protected StringType copyright;
/**
* Identifies how precise the data element is in its definition.
*/
@Child(name = "specificity", type = {CodeType.class}, order=11, min=0, max=1)
@Child(name = "stringency", type = {CodeType.class}, order=11, min=0, max=1)
@Description(shortDefinition="comparable | fully-specified | equivalent | convertable | scaleable | flexible", formalDefinition="Identifies how precise the data element is in its definition." )
protected Enumeration<DataElementSpecificity> specificity;
protected Enumeration<DataElementStringency> stringency;
/**
* Identifies a specification (other than a terminology) that the elements that make up the DataElement hav some correspondance with.
@ -718,7 +718,7 @@ public class DataElement extends DomainResource {
@Description(shortDefinition="Definition of element", formalDefinition="Defines the structure, type, allowed values and other constraining characteristics of the data element." )
protected List<ElementDefinition> element;
private static final long serialVersionUID = 576052437L;
private static final long serialVersionUID = 2017352331L;
/*
* Constructor
@ -736,7 +736,7 @@ public class DataElement extends DomainResource {
}
/**
* @return {@link #url} (An absolute uri that is used to identify this element when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
* @return {@link #url} (An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
*/
public UriType getUrlElement() {
if (this.url == null)
@ -756,7 +756,7 @@ public class DataElement extends DomainResource {
}
/**
* @param value {@link #url} (An absolute uri that is used to identify this element when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
* @param value {@link #url} (An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
*/
public DataElement setUrlElement(UriType value) {
this.url = value;
@ -764,14 +764,14 @@ public class DataElement extends DomainResource {
}
/**
* @return An absolute uri that is used to identify this element when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:).
* @return An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.
*/
public String getUrl() {
return this.url == null ? null : this.url.getValue();
}
/**
* @param value An absolute uri that is used to identify this element when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:).
* @param value An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.
*/
public DataElement setUrl(String value) {
if (Utilities.noString(value))
@ -787,24 +787,40 @@ public class DataElement extends DomainResource {
/**
* @return {@link #identifier} (Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.)
*/
public Identifier getIdentifier() {
public List<Identifier> getIdentifier() {
if (this.identifier == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DataElement.identifier");
else if (Configuration.doAutoCreate())
this.identifier = new Identifier(); // cc
this.identifier = new ArrayList<Identifier>();
return this.identifier;
}
public boolean hasIdentifier() {
return this.identifier != null && !this.identifier.isEmpty();
if (this.identifier == null)
return false;
for (Identifier item : this.identifier)
if (!item.isEmpty())
return true;
return false;
}
/**
* @param value {@link #identifier} (Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.)
* @return {@link #identifier} (Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.)
*/
public DataElement setIdentifier(Identifier value) {
this.identifier = value;
// syntactic sugar
public Identifier addIdentifier() { //3
Identifier t = new Identifier();
if (this.identifier == null)
this.identifier = new ArrayList<Identifier>();
this.identifier.add(t);
return t;
}
// syntactic sugar
public DataElement addIdentifier(Identifier t) { //3
if (t == null)
return this;
if (this.identifier == null)
this.identifier = new ArrayList<Identifier>();
this.identifier.add(t);
return this;
}
@ -906,91 +922,6 @@ public class DataElement extends DomainResource {
return this;
}
/**
* @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.)
*/
public List<CodeableConcept> getUseContext() {
if (this.useContext == null)
this.useContext = new ArrayList<CodeableConcept>();
return this.useContext;
}
public boolean hasUseContext() {
if (this.useContext == null)
return false;
for (CodeableConcept item : this.useContext)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.)
*/
// syntactic sugar
public CodeableConcept addUseContext() { //3
CodeableConcept t = new CodeableConcept();
if (this.useContext == null)
this.useContext = new ArrayList<CodeableConcept>();
this.useContext.add(t);
return t;
}
// syntactic sugar
public DataElement addUseContext(CodeableConcept t) { //3
if (t == null)
return this;
if (this.useContext == null)
this.useContext = new ArrayList<CodeableConcept>();
this.useContext.add(t);
return this;
}
/**
* @return {@link #experimental} (A flag to indicate that this search data elemnt definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
*/
public BooleanType getExperimentalElement() {
if (this.experimental == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DataElement.experimental");
else if (Configuration.doAutoCreate())
this.experimental = new BooleanType(); // bb
return this.experimental;
}
public boolean hasExperimentalElement() {
return this.experimental != null && !this.experimental.isEmpty();
}
public boolean hasExperimental() {
return this.experimental != null && !this.experimental.isEmpty();
}
/**
* @param value {@link #experimental} (A flag to indicate that this search data elemnt definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
*/
public DataElement setExperimentalElement(BooleanType value) {
this.experimental = value;
return this;
}
/**
* @return A flag to indicate that this search data elemnt definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
*/
public boolean getExperimental() {
return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
}
/**
* @param value A flag to indicate that this search data elemnt definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
*/
public DataElement setExperimental(boolean value) {
if (this.experimental == null)
this.experimental = new BooleanType();
this.experimental.setValue(value);
return this;
}
/**
* @return {@link #status} (The status of the data element.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
*/
@ -1037,100 +968,47 @@ public class DataElement extends DomainResource {
}
/**
* @return {@link #date} (The date that the status for this business version of the data element became effective. (I.e. Date the draft was created, date element became active or date element became retired).). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
* @return {@link #experimental} (A flag to indicate that this search data elemnt definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
*/
public DateTimeType getDateElement() {
if (this.date == null)
public BooleanType getExperimentalElement() {
if (this.experimental == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DataElement.date");
throw new Error("Attempt to auto-create DataElement.experimental");
else if (Configuration.doAutoCreate())
this.date = new DateTimeType(); // bb
return this.date;
this.experimental = new BooleanType(); // bb
return this.experimental;
}
public boolean hasDateElement() {
return this.date != null && !this.date.isEmpty();
public boolean hasExperimentalElement() {
return this.experimental != null && !this.experimental.isEmpty();
}
public boolean hasDate() {
return this.date != null && !this.date.isEmpty();
public boolean hasExperimental() {
return this.experimental != null && !this.experimental.isEmpty();
}
/**
* @param value {@link #date} (The date that the status for this business version of the data element became effective. (I.e. Date the draft was created, date element became active or date element became retired).). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
* @param value {@link #experimental} (A flag to indicate that this search data elemnt definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
*/
public DataElement setDateElement(DateTimeType value) {
this.date = value;
public DataElement setExperimentalElement(BooleanType value) {
this.experimental = value;
return this;
}
/**
* @return The date that the status for this business version of the data element became effective. (I.e. Date the draft was created, date element became active or date element became retired).
* @return A flag to indicate that this search data elemnt definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
*/
public Date getDate() {
return this.date == null ? null : this.date.getValue();
public boolean getExperimental() {
return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
}
/**
* @param value The date that the status for this business version of the data element became effective. (I.e. Date the draft was created, date element became active or date element became retired).
* @param value A flag to indicate that this search data elemnt definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
*/
public DataElement setDate(Date value) {
if (value == null)
this.date = null;
else {
if (this.date == null)
this.date = new DateTimeType();
this.date.setValue(value);
}
return this;
}
/**
* @return {@link #copyright} (A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
*/
public StringType getCopyrightElement() {
if (this.copyright == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DataElement.copyright");
else if (Configuration.doAutoCreate())
this.copyright = new StringType(); // bb
return this.copyright;
}
public boolean hasCopyrightElement() {
return this.copyright != null && !this.copyright.isEmpty();
}
public boolean hasCopyright() {
return this.copyright != null && !this.copyright.isEmpty();
}
/**
* @param value {@link #copyright} (A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
*/
public DataElement setCopyrightElement(StringType value) {
this.copyright = value;
return this;
}
/**
* @return A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.
*/
public String getCopyright() {
return this.copyright == null ? null : this.copyright.getValue();
}
/**
* @param value A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.
*/
public DataElement setCopyright(String value) {
if (Utilities.noString(value))
this.copyright = null;
else {
if (this.copyright == null)
this.copyright = new StringType();
this.copyright.setValue(value);
}
public DataElement setExperimental(boolean value) {
if (this.experimental == null)
this.experimental = new BooleanType();
this.experimental.setValue(value);
return this;
}
@ -1224,50 +1102,188 @@ public class DataElement extends DomainResource {
}
/**
* @return {@link #specificity} (Identifies how precise the data element is in its definition.). This is the underlying object with id, value and extensions. The accessor "getSpecificity" gives direct access to the value
* @return {@link #date} (The date that this version of the Data Element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the data element changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
public Enumeration<DataElementSpecificity> getSpecificityElement() {
if (this.specificity == null)
public DateTimeType getDateElement() {
if (this.date == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DataElement.specificity");
throw new Error("Attempt to auto-create DataElement.date");
else if (Configuration.doAutoCreate())
this.specificity = new Enumeration<DataElementSpecificity>(new DataElementSpecificityEnumFactory()); // bb
return this.specificity;
this.date = new DateTimeType(); // bb
return this.date;
}
public boolean hasSpecificityElement() {
return this.specificity != null && !this.specificity.isEmpty();
public boolean hasDateElement() {
return this.date != null && !this.date.isEmpty();
}
public boolean hasSpecificity() {
return this.specificity != null && !this.specificity.isEmpty();
public boolean hasDate() {
return this.date != null && !this.date.isEmpty();
}
/**
* @param value {@link #specificity} (Identifies how precise the data element is in its definition.). This is the underlying object with id, value and extensions. The accessor "getSpecificity" gives direct access to the value
* @param value {@link #date} (The date that this version of the Data Element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the data element changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
public DataElement setSpecificityElement(Enumeration<DataElementSpecificity> value) {
this.specificity = value;
public DataElement setDateElement(DateTimeType value) {
this.date = value;
return this;
}
/**
* @return The date that this version of the Data Element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the data element changes.
*/
public Date getDate() {
return this.date == null ? null : this.date.getValue();
}
/**
* @param value The date that this version of the Data Element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the data element changes.
*/
public DataElement setDate(Date value) {
if (value == null)
this.date = null;
else {
if (this.date == null)
this.date = new DateTimeType();
this.date.setValue(value);
}
return this;
}
/**
* @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.)
*/
public List<CodeableConcept> getUseContext() {
if (this.useContext == null)
this.useContext = new ArrayList<CodeableConcept>();
return this.useContext;
}
public boolean hasUseContext() {
if (this.useContext == null)
return false;
for (CodeableConcept item : this.useContext)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.)
*/
// syntactic sugar
public CodeableConcept addUseContext() { //3
CodeableConcept t = new CodeableConcept();
if (this.useContext == null)
this.useContext = new ArrayList<CodeableConcept>();
this.useContext.add(t);
return t;
}
// syntactic sugar
public DataElement addUseContext(CodeableConcept t) { //3
if (t == null)
return this;
if (this.useContext == null)
this.useContext = new ArrayList<CodeableConcept>();
this.useContext.add(t);
return this;
}
/**
* @return {@link #copyright} (A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
*/
public StringType getCopyrightElement() {
if (this.copyright == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DataElement.copyright");
else if (Configuration.doAutoCreate())
this.copyright = new StringType(); // bb
return this.copyright;
}
public boolean hasCopyrightElement() {
return this.copyright != null && !this.copyright.isEmpty();
}
public boolean hasCopyright() {
return this.copyright != null && !this.copyright.isEmpty();
}
/**
* @param value {@link #copyright} (A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
*/
public DataElement setCopyrightElement(StringType value) {
this.copyright = value;
return this;
}
/**
* @return A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.
*/
public String getCopyright() {
return this.copyright == null ? null : this.copyright.getValue();
}
/**
* @param value A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.
*/
public DataElement setCopyright(String value) {
if (Utilities.noString(value))
this.copyright = null;
else {
if (this.copyright == null)
this.copyright = new StringType();
this.copyright.setValue(value);
}
return this;
}
/**
* @return {@link #stringency} (Identifies how precise the data element is in its definition.). This is the underlying object with id, value and extensions. The accessor "getStringency" gives direct access to the value
*/
public Enumeration<DataElementStringency> getStringencyElement() {
if (this.stringency == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DataElement.stringency");
else if (Configuration.doAutoCreate())
this.stringency = new Enumeration<DataElementStringency>(new DataElementStringencyEnumFactory()); // bb
return this.stringency;
}
public boolean hasStringencyElement() {
return this.stringency != null && !this.stringency.isEmpty();
}
public boolean hasStringency() {
return this.stringency != null && !this.stringency.isEmpty();
}
/**
* @param value {@link #stringency} (Identifies how precise the data element is in its definition.). This is the underlying object with id, value and extensions. The accessor "getStringency" gives direct access to the value
*/
public DataElement setStringencyElement(Enumeration<DataElementStringency> value) {
this.stringency = value;
return this;
}
/**
* @return Identifies how precise the data element is in its definition.
*/
public DataElementSpecificity getSpecificity() {
return this.specificity == null ? null : this.specificity.getValue();
public DataElementStringency getStringency() {
return this.stringency == null ? null : this.stringency.getValue();
}
/**
* @param value Identifies how precise the data element is in its definition.
*/
public DataElement setSpecificity(DataElementSpecificity value) {
public DataElement setStringency(DataElementStringency value) {
if (value == null)
this.specificity = null;
this.stringency = null;
else {
if (this.specificity == null)
this.specificity = new Enumeration<DataElementSpecificity>(new DataElementSpecificityEnumFactory());
this.specificity.setValue(value);
if (this.stringency == null)
this.stringency = new Enumeration<DataElementStringency>(new DataElementStringencyEnumFactory());
this.stringency.setValue(value);
}
return this;
}
@ -1354,18 +1370,18 @@ public class DataElement extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("url", "uri", "An absolute uri that is used to identify this element when it is referenced in a specification, model, design or an instance (should be globally unique URI, and can be urn:uuid: or urn:oid:).", 0, java.lang.Integer.MAX_VALUE, url));
childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url));
childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.", 0, java.lang.Integer.MAX_VALUE, version));
childrenList.add(new Property("name", "string", "The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.", 0, java.lang.Integer.MAX_VALUE, name));
childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.", 0, java.lang.Integer.MAX_VALUE, useContext));
childrenList.add(new Property("experimental", "boolean", "A flag to indicate that this search data elemnt definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental));
childrenList.add(new Property("status", "code", "The status of the data element.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("date", "dateTime", "The date that the status for this business version of the data element became effective. (I.e. Date the draft was created, date element became active or date element became retired).", 0, java.lang.Integer.MAX_VALUE, date));
childrenList.add(new Property("copyright", "string", "A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.", 0, java.lang.Integer.MAX_VALUE, copyright));
childrenList.add(new Property("experimental", "boolean", "A flag to indicate that this search data elemnt definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental));
childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the data element.", 0, java.lang.Integer.MAX_VALUE, publisher));
childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
childrenList.add(new Property("specificity", "code", "Identifies how precise the data element is in its definition.", 0, java.lang.Integer.MAX_VALUE, specificity));
childrenList.add(new Property("date", "dateTime", "The date that this version of the Data Element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. in addition, it should change when the substantiative content of the data element changes.", 0, java.lang.Integer.MAX_VALUE, date));
childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.", 0, java.lang.Integer.MAX_VALUE, useContext));
childrenList.add(new Property("copyright", "string", "A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.", 0, java.lang.Integer.MAX_VALUE, copyright));
childrenList.add(new Property("stringency", "code", "Identifies how precise the data element is in its definition.", 0, java.lang.Integer.MAX_VALUE, stringency));
childrenList.add(new Property("mapping", "", "Identifies a specification (other than a terminology) that the elements that make up the DataElement hav some correspondance with.", 0, java.lang.Integer.MAX_VALUE, mapping));
childrenList.add(new Property("element", "ElementDefinition", "Defines the structure, type, allowed values and other constraining characteristics of the data element.", 0, java.lang.Integer.MAX_VALUE, element));
}
@ -1374,25 +1390,29 @@ public class DataElement extends DomainResource {
DataElement dst = new DataElement();
copyValues(dst);
dst.url = url == null ? null : url.copy();
dst.identifier = identifier == null ? null : identifier.copy();
if (identifier != null) {
dst.identifier = new ArrayList<Identifier>();
for (Identifier i : identifier)
dst.identifier.add(i.copy());
};
dst.version = version == null ? null : version.copy();
dst.name = name == null ? null : name.copy();
if (useContext != null) {
dst.useContext = new ArrayList<CodeableConcept>();
for (CodeableConcept i : useContext)
dst.useContext.add(i.copy());
};
dst.experimental = experimental == null ? null : experimental.copy();
dst.status = status == null ? null : status.copy();
dst.date = date == null ? null : date.copy();
dst.copyright = copyright == null ? null : copyright.copy();
dst.experimental = experimental == null ? null : experimental.copy();
dst.publisher = publisher == null ? null : publisher.copy();
if (contact != null) {
dst.contact = new ArrayList<DataElementContactComponent>();
for (DataElementContactComponent i : contact)
dst.contact.add(i.copy());
};
dst.specificity = specificity == null ? null : specificity.copy();
dst.date = date == null ? null : date.copy();
if (useContext != null) {
dst.useContext = new ArrayList<CodeableConcept>();
for (CodeableConcept i : useContext)
dst.useContext.add(i.copy());
};
dst.copyright = copyright == null ? null : copyright.copy();
dst.stringency = stringency == null ? null : stringency.copy();
if (mapping != null) {
dst.mapping = new ArrayList<DataElementMappingComponent>();
for (DataElementMappingComponent i : mapping)
@ -1418,9 +1438,9 @@ public class DataElement extends DomainResource {
return false;
DataElement o = (DataElement) other;
return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
&& compareDeep(name, o.name, true) && compareDeep(useContext, o.useContext, true) && compareDeep(experimental, o.experimental, true)
&& compareDeep(status, o.status, true) && compareDeep(date, o.date, true) && compareDeep(copyright, o.copyright, true)
&& compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(specificity, o.specificity, true)
&& compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true)
&& compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true)
&& compareDeep(useContext, o.useContext, true) && compareDeep(copyright, o.copyright, true) && compareDeep(stringency, o.stringency, true)
&& compareDeep(mapping, o.mapping, true) && compareDeep(element, o.element, true);
}
@ -1432,17 +1452,17 @@ public class DataElement extends DomainResource {
return false;
DataElement o = (DataElement) other;
return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true)
&& compareValues(experimental, o.experimental, true) && compareValues(status, o.status, true) && compareValues(date, o.date, true)
&& compareValues(copyright, o.copyright, true) && compareValues(publisher, o.publisher, true) && compareValues(specificity, o.specificity, true)
&& compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true)
&& compareValues(date, o.date, true) && compareValues(copyright, o.copyright, true) && compareValues(stringency, o.stringency, true)
;
}
public boolean isEmpty() {
return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (useContext == null || useContext.isEmpty())
&& (experimental == null || experimental.isEmpty()) && (status == null || status.isEmpty())
&& (date == null || date.isEmpty()) && (copyright == null || copyright.isEmpty()) && (publisher == null || publisher.isEmpty())
&& (contact == null || contact.isEmpty()) && (specificity == null || specificity.isEmpty())
&& (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty())
&& (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty())
&& (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (useContext == null || useContext.isEmpty())
&& (copyright == null || copyright.isEmpty()) && (stringency == null || stringency.isEmpty())
&& (mapping == null || mapping.isEmpty()) && (element == null || element.isEmpty());
}
@ -1457,6 +1477,8 @@ public class DataElement extends DomainResource {
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="code", path="DataElement.element.code", description="A code for the data element (server may choose to do subsumption)", type="token" )
public static final String SP_CODE = "code";
@SearchParamDefinition(name="stringency", path="DataElement.stringency", description="The stringency of the data element definition", type="token" )
public static final String SP_STRINGENCY = "stringency";
@SearchParamDefinition(name="name", path="DataElement.name", description="Name of the data element", type="string" )
public static final String SP_NAME = "name";
@SearchParamDefinition(name="context", path="DataElement.useContext", description="A use context assigned to the data element", type="token" )

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -648,9 +648,9 @@ public class DiagnosticOrder extends DomainResource {
/**
* Anatomical location where the request test should be performed. This is the target site.
*/
@Child(name = "bodySite", type = {CodeableConcept.class, BodySite.class}, order=3, min=0, max=1)
@Child(name = "bodySite", type = {CodeableConcept.class}, order=3, min=0, max=1)
@Description(shortDefinition="Location of requested test (if applicable)", formalDefinition="Anatomical location where the request test should be performed. This is the target site." )
protected Type bodySite;
protected CodeableConcept bodySite;
/**
* The status of this individual item within the order.
@ -666,7 +666,7 @@ public class DiagnosticOrder extends DomainResource {
@Description(shortDefinition="Events specific to this item", formalDefinition="A summary of the events of interest that have occurred as this item of the request is processed." )
protected List<DiagnosticOrderEventComponent> event;
private static final long serialVersionUID = 1960490281L;
private static final long serialVersionUID = 381238192L;
/*
* Constructor
@ -771,36 +771,15 @@ public class DiagnosticOrder extends DomainResource {
/**
* @return {@link #bodySite} (Anatomical location where the request test should be performed. This is the target site.)
*/
public Type getBodySite() {
public CodeableConcept getBodySite() {
if (this.bodySite == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DiagnosticOrderItemComponent.bodySite");
else if (Configuration.doAutoCreate())
this.bodySite = new CodeableConcept(); // cc
return this.bodySite;
}
/**
* @return {@link #bodySite} (Anatomical location where the request test should be performed. This is the target site.)
*/
public CodeableConcept getBodySiteCodeableConcept() throws Exception {
if (!(this.bodySite instanceof CodeableConcept))
throw new Exception("Type mismatch: the type CodeableConcept was expected, but "+this.bodySite.getClass().getName()+" was encountered");
return (CodeableConcept) this.bodySite;
}
public boolean hasBodySiteCodeableConcept() throws Exception {
return this.bodySite instanceof CodeableConcept;
}
/**
* @return {@link #bodySite} (Anatomical location where the request test should be performed. This is the target site.)
*/
public Reference getBodySiteReference() throws Exception {
if (!(this.bodySite instanceof Reference))
throw new Exception("Type mismatch: the type Reference was expected, but "+this.bodySite.getClass().getName()+" was encountered");
return (Reference) this.bodySite;
}
public boolean hasBodySiteReference() throws Exception {
return this.bodySite instanceof Reference;
}
public boolean hasBodySite() {
return this.bodySite != null && !this.bodySite.isEmpty();
}
@ -808,7 +787,7 @@ public class DiagnosticOrder extends DomainResource {
/**
* @param value {@link #bodySite} (Anatomical location where the request test should be performed. This is the target site.)
*/
public DiagnosticOrderItemComponent setBodySite(Type value) {
public DiagnosticOrderItemComponent setBodySite(CodeableConcept value) {
this.bodySite = value;
return this;
}
@ -906,7 +885,7 @@ public class DiagnosticOrder extends DomainResource {
super.listChildren(childrenList);
childrenList.add(new Property("code", "CodeableConcept", "A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested.", 0, java.lang.Integer.MAX_VALUE, code));
childrenList.add(new Property("specimen", "Reference(Specimen)", "If the item is related to a specific specimen.", 0, java.lang.Integer.MAX_VALUE, specimen));
childrenList.add(new Property("bodySite[x]", "CodeableConcept|Reference(BodySite)", "Anatomical location where the request test should be performed. This is the target site.", 0, java.lang.Integer.MAX_VALUE, bodySite));
childrenList.add(new Property("bodySite", "CodeableConcept", "Anatomical location where the request test should be performed. This is the target site.", 0, java.lang.Integer.MAX_VALUE, bodySite));
childrenList.add(new Property("status", "code", "The status of this individual item within the order.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("event", "@DiagnosticOrder.event", "A summary of the events of interest that have occurred as this item of the request is processed.", 0, java.lang.Integer.MAX_VALUE, event));
}
@ -984,10 +963,10 @@ public class DiagnosticOrder extends DomainResource {
protected Practitioner ordererTarget;
/**
* Identifiers assigned to this order by the orderer and/or the receiver and/or order fulfiller.
* Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.
*/
@Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order by the orderer and/or the receiver and/or order fulfiller." )
@Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller." )
protected List<Identifier> identifier;
/**
@ -1003,20 +982,20 @@ public class DiagnosticOrder extends DomainResource {
protected Encounter encounterTarget;
/**
* An explanation or justification for why this diagnostic investigation is being requested.
* An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.
*/
@Child(name = "clinicalNotes", type = {StringType.class}, order=4, min=0, max=1)
@Description(shortDefinition="Explanation/Justification for test", formalDefinition="An explanation or justification for why this diagnostic investigation is being requested." )
protected StringType clinicalNotes;
@Child(name = "reason", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Explanation/Justification for test", formalDefinition="An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation." )
protected List<CodeableConcept> reason;
/**
* Additional clinical information about the patient or specimen that may influence test interpretations.
* Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.
*/
@Child(name = "supportingInformation", type = {Observation.class, Condition.class, DocumentReference.class}, order=5, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Additional clinical information", formalDefinition="Additional clinical information about the patient or specimen that may influence test interpretations." )
@Description(shortDefinition="Additional clinical information", formalDefinition="Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order." )
protected List<Reference> supportingInformation;
/**
* The actual objects that are the target of the reference (Additional clinical information about the patient or specimen that may influence test interpretations.)
* The actual objects that are the target of the reference (Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.)
*/
protected List<Resource> supportingInformationTarget;
@ -1061,7 +1040,14 @@ public class DiagnosticOrder extends DomainResource {
@Description(shortDefinition="The items the orderer requested", formalDefinition="The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested." )
protected List<DiagnosticOrderItemComponent> item;
private static final long serialVersionUID = 1028294242L;
/**
* Any other notes associated with this patient or specimen or order (e.g. "patient hates needles").
*/
@Child(name = "note", type = {Annotation.class}, order=11, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Other notes and comments", formalDefinition="Any other notes associated with this patient or specimen or order (e.g. 'patient hates needles')." )
protected List<Annotation> note;
private static final long serialVersionUID = 700891227L;
/*
* Constructor
@ -1162,7 +1148,7 @@ public class DiagnosticOrder extends DomainResource {
}
/**
* @return {@link #identifier} (Identifiers assigned to this order by the orderer and/or the receiver and/or order fulfiller.)
* @return {@link #identifier} (Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.)
*/
public List<Identifier> getIdentifier() {
if (this.identifier == null)
@ -1180,7 +1166,7 @@ public class DiagnosticOrder extends DomainResource {
}
/**
* @return {@link #identifier} (Identifiers assigned to this order by the orderer and/or the receiver and/or order fulfiller.)
* @return {@link #identifier} (Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.)
*/
// syntactic sugar
public Identifier addIdentifier() { //3
@ -1246,56 +1232,47 @@ public class DiagnosticOrder extends DomainResource {
}
/**
* @return {@link #clinicalNotes} (An explanation or justification for why this diagnostic investigation is being requested.). This is the underlying object with id, value and extensions. The accessor "getClinicalNotes" gives direct access to the value
* @return {@link #reason} (An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.)
*/
public StringType getClinicalNotesElement() {
if (this.clinicalNotes == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DiagnosticOrder.clinicalNotes");
else if (Configuration.doAutoCreate())
this.clinicalNotes = new StringType(); // bb
return this.clinicalNotes;
public List<CodeableConcept> getReason() {
if (this.reason == null)
this.reason = new ArrayList<CodeableConcept>();
return this.reason;
}
public boolean hasClinicalNotesElement() {
return this.clinicalNotes != null && !this.clinicalNotes.isEmpty();
}
public boolean hasClinicalNotes() {
return this.clinicalNotes != null && !this.clinicalNotes.isEmpty();
public boolean hasReason() {
if (this.reason == null)
return false;
for (CodeableConcept item : this.reason)
if (!item.isEmpty())
return true;
return false;
}
/**
* @param value {@link #clinicalNotes} (An explanation or justification for why this diagnostic investigation is being requested.). This is the underlying object with id, value and extensions. The accessor "getClinicalNotes" gives direct access to the value
* @return {@link #reason} (An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.)
*/
public DiagnosticOrder setClinicalNotesElement(StringType value) {
this.clinicalNotes = value;
// syntactic sugar
public CodeableConcept addReason() { //3
CodeableConcept t = new CodeableConcept();
if (this.reason == null)
this.reason = new ArrayList<CodeableConcept>();
this.reason.add(t);
return t;
}
// syntactic sugar
public DiagnosticOrder addReason(CodeableConcept t) { //3
if (t == null)
return this;
if (this.reason == null)
this.reason = new ArrayList<CodeableConcept>();
this.reason.add(t);
return this;
}
/**
* @return An explanation or justification for why this diagnostic investigation is being requested.
*/
public String getClinicalNotes() {
return this.clinicalNotes == null ? null : this.clinicalNotes.getValue();
}
/**
* @param value An explanation or justification for why this diagnostic investigation is being requested.
*/
public DiagnosticOrder setClinicalNotes(String value) {
if (Utilities.noString(value))
this.clinicalNotes = null;
else {
if (this.clinicalNotes == null)
this.clinicalNotes = new StringType();
this.clinicalNotes.setValue(value);
}
return this;
}
/**
* @return {@link #supportingInformation} (Additional clinical information about the patient or specimen that may influence test interpretations.)
* @return {@link #supportingInformation} (Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.)
*/
public List<Reference> getSupportingInformation() {
if (this.supportingInformation == null)
@ -1313,7 +1290,7 @@ public class DiagnosticOrder extends DomainResource {
}
/**
* @return {@link #supportingInformation} (Additional clinical information about the patient or specimen that may influence test interpretations.)
* @return {@link #supportingInformation} (Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.)
*/
// syntactic sugar
public Reference addSupportingInformation() { //3
@ -1335,7 +1312,7 @@ public class DiagnosticOrder extends DomainResource {
}
/**
* @return {@link #supportingInformation} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Additional clinical information about the patient or specimen that may influence test interpretations.)
* @return {@link #supportingInformation} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.)
*/
public List<Resource> getSupportingInformationTarget() {
if (this.supportingInformationTarget == null)
@ -1582,19 +1559,60 @@ public class DiagnosticOrder extends DomainResource {
return this;
}
/**
* @return {@link #note} (Any other notes associated with this patient or specimen or order (e.g. "patient hates needles").)
*/
public List<Annotation> getNote() {
if (this.note == null)
this.note = new ArrayList<Annotation>();
return this.note;
}
public boolean hasNote() {
if (this.note == null)
return false;
for (Annotation item : this.note)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #note} (Any other notes associated with this patient or specimen or order (e.g. "patient hates needles").)
*/
// syntactic sugar
public Annotation addNote() { //3
Annotation t = new Annotation();
if (this.note == null)
this.note = new ArrayList<Annotation>();
this.note.add(t);
return t;
}
// syntactic sugar
public DiagnosticOrder addNote(Annotation t) { //3
if (t == null)
return this;
if (this.note == null)
this.note = new ArrayList<Annotation>();
this.note.add(t);
return this;
}
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("subject", "Reference(Patient|Group|Location|Device)", "Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).", 0, java.lang.Integer.MAX_VALUE, subject));
childrenList.add(new Property("orderer", "Reference(Practitioner)", "The practitioner that holds legal responsibility for ordering the investigation.", 0, java.lang.Integer.MAX_VALUE, orderer));
childrenList.add(new Property("identifier", "Identifier", "Identifiers assigned to this order by the orderer and/or the receiver and/or order fulfiller.", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("identifier", "Identifier", "Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, java.lang.Integer.MAX_VALUE, encounter));
childrenList.add(new Property("clinicalNotes", "string", "An explanation or justification for why this diagnostic investigation is being requested.", 0, java.lang.Integer.MAX_VALUE, clinicalNotes));
childrenList.add(new Property("supportingInformation", "Reference(Observation|Condition|DocumentReference)", "Additional clinical information about the patient or specimen that may influence test interpretations.", 0, java.lang.Integer.MAX_VALUE, supportingInformation));
childrenList.add(new Property("reason", "CodeableConcept", "An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.", 0, java.lang.Integer.MAX_VALUE, reason));
childrenList.add(new Property("supportingInformation", "Reference(Observation|Condition|DocumentReference)", "Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.", 0, java.lang.Integer.MAX_VALUE, supportingInformation));
childrenList.add(new Property("specimen", "Reference(Specimen)", "One or more specimens that the diagnostic investigation is about.", 0, java.lang.Integer.MAX_VALUE, specimen));
childrenList.add(new Property("status", "code", "The status of the order.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("priority", "code", "The clinical priority associated with this order.", 0, java.lang.Integer.MAX_VALUE, priority));
childrenList.add(new Property("event", "", "A summary of the events of interest that have occurred as the request is processed. E.g. when the order was made, various processing steps (specimens received), when it was completed.", 0, java.lang.Integer.MAX_VALUE, event));
childrenList.add(new Property("item", "", "The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.", 0, java.lang.Integer.MAX_VALUE, item));
childrenList.add(new Property("note", "Annotation", "Any other notes associated with this patient or specimen or order (e.g. 'patient hates needles').", 0, java.lang.Integer.MAX_VALUE, note));
}
public DiagnosticOrder copy() {
@ -1608,7 +1626,11 @@ public class DiagnosticOrder extends DomainResource {
dst.identifier.add(i.copy());
};
dst.encounter = encounter == null ? null : encounter.copy();
dst.clinicalNotes = clinicalNotes == null ? null : clinicalNotes.copy();
if (reason != null) {
dst.reason = new ArrayList<CodeableConcept>();
for (CodeableConcept i : reason)
dst.reason.add(i.copy());
};
if (supportingInformation != null) {
dst.supportingInformation = new ArrayList<Reference>();
for (Reference i : supportingInformation)
@ -1631,6 +1653,11 @@ public class DiagnosticOrder extends DomainResource {
for (DiagnosticOrderItemComponent i : item)
dst.item.add(i.copy());
};
if (note != null) {
dst.note = new ArrayList<Annotation>();
for (Annotation i : note)
dst.note.add(i.copy());
};
return dst;
}
@ -1646,10 +1673,10 @@ public class DiagnosticOrder extends DomainResource {
return false;
DiagnosticOrder o = (DiagnosticOrder) other;
return compareDeep(subject, o.subject, true) && compareDeep(orderer, o.orderer, true) && compareDeep(identifier, o.identifier, true)
&& compareDeep(encounter, o.encounter, true) && compareDeep(clinicalNotes, o.clinicalNotes, true)
&& compareDeep(supportingInformation, o.supportingInformation, true) && compareDeep(specimen, o.specimen, true)
&& compareDeep(status, o.status, true) && compareDeep(priority, o.priority, true) && compareDeep(event, o.event, true)
&& compareDeep(item, o.item, true);
&& compareDeep(encounter, o.encounter, true) && compareDeep(reason, o.reason, true) && compareDeep(supportingInformation, o.supportingInformation, true)
&& compareDeep(specimen, o.specimen, true) && compareDeep(status, o.status, true) && compareDeep(priority, o.priority, true)
&& compareDeep(event, o.event, true) && compareDeep(item, o.item, true) && compareDeep(note, o.note, true)
;
}
@Override
@ -1659,16 +1686,16 @@ public class DiagnosticOrder extends DomainResource {
if (!(other instanceof DiagnosticOrder))
return false;
DiagnosticOrder o = (DiagnosticOrder) other;
return compareValues(clinicalNotes, o.clinicalNotes, true) && compareValues(status, o.status, true)
&& compareValues(priority, o.priority, true);
return compareValues(status, o.status, true) && compareValues(priority, o.priority, true);
}
public boolean isEmpty() {
return super.isEmpty() && (subject == null || subject.isEmpty()) && (orderer == null || orderer.isEmpty())
&& (identifier == null || identifier.isEmpty()) && (encounter == null || encounter.isEmpty())
&& (clinicalNotes == null || clinicalNotes.isEmpty()) && (supportingInformation == null || supportingInformation.isEmpty())
&& (reason == null || reason.isEmpty()) && (supportingInformation == null || supportingInformation.isEmpty())
&& (specimen == null || specimen.isEmpty()) && (status == null || status.isEmpty()) && (priority == null || priority.isEmpty())
&& (event == null || event.isEmpty()) && (item == null || item.isEmpty());
&& (event == null || event.isEmpty()) && (item == null || item.isEmpty()) && (note == null || note.isEmpty())
;
}
@Override
@ -1680,7 +1707,7 @@ public class DiagnosticOrder extends DomainResource {
public static final String SP_ITEMPASTSTATUS = "item-past-status";
@SearchParamDefinition(name="identifier", path="DiagnosticOrder.identifier", description="Identifiers assigned to this order", type="token" )
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="bodysite", path="DiagnosticOrder.item.bodySite[x]", description="Location of requested test (if applicable)", type="token" )
@SearchParamDefinition(name="bodysite", path="DiagnosticOrder.item.bodySite", description="Location of requested test (if applicable)", type="token" )
public static final String SP_BODYSITE = "bodysite";
@SearchParamDefinition(name="code", path="DiagnosticOrder.item.code", description="Code to indicate the item (test or panel) being ordered", type="token" )
public static final String SP_CODE = "code";

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -361,11 +361,11 @@ public class DiagnosticReport extends DomainResource {
}
/**
* A code or name that describes this diagnostic report.
* The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.
*/
@Child(name = "code", type = {CodeableConcept.class}, order=0, min=1, max=1)
@Description(shortDefinition="Name/Code for this diagnostic report", formalDefinition="A code or name that describes this diagnostic report." )
protected CodeableConcept code;
@Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Id for external references to this report", formalDefinition="The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider." )
protected List<Identifier> identifier;
/**
* The status of the diagnostic report as a whole.
@ -375,16 +375,23 @@ public class DiagnosticReport extends DomainResource {
protected Enumeration<DiagnosticReportStatus> status;
/**
* The date and time that this version of the report was released from the source diagnostic service.
* A code that classifies the dlinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.
*/
@Child(name = "issued", type = {InstantType.class}, order=2, min=1, max=1)
@Description(shortDefinition="DateTime this version was released", formalDefinition="The date and time that this version of the report was released from the source diagnostic service." )
protected InstantType issued;
@Child(name = "category", type = {CodeableConcept.class}, order=2, min=0, max=1)
@Description(shortDefinition="Service category", formalDefinition="A code that classifies the dlinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes." )
protected CodeableConcept category;
/**
* A code or name that describes this diagnostic report.
*/
@Child(name = "code", type = {CodeableConcept.class}, order=3, min=1, max=1)
@Description(shortDefinition="Name/Code for this diagnostic report", formalDefinition="A code or name that describes this diagnostic report." )
protected CodeableConcept code;
/**
* The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.
*/
@Child(name = "subject", type = {Patient.class, Group.class, Device.class, Location.class}, order=3, min=1, max=1)
@Child(name = "subject", type = {Patient.class, Group.class, Device.class, Location.class}, order=4, min=1, max=1)
@Description(shortDefinition="The subject of the report, usually, but not always, the patient", formalDefinition="The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources." )
protected Reference subject;
@ -393,18 +400,6 @@ public class DiagnosticReport extends DomainResource {
*/
protected Resource subjectTarget;
/**
* The diagnostic service that is responsible for issuing the report.
*/
@Child(name = "performer", type = {Practitioner.class, Organization.class}, order=4, min=1, max=1)
@Description(shortDefinition="Responsible Diagnostic Service", formalDefinition="The diagnostic service that is responsible for issuing the report." )
protected Reference performer;
/**
* The actual object that is the target of the reference (The diagnostic service that is responsible for issuing the report.)
*/
protected Resource performerTarget;
/**
* The link to the health care event (encounter) when the order was made.
*/
@ -418,16 +413,35 @@ public class DiagnosticReport extends DomainResource {
protected Encounter encounterTarget;
/**
* The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.
* The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.
*/
@Child(name = "identifier", type = {Identifier.class}, order=6, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Id for external references to this report", formalDefinition="The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider." )
protected List<Identifier> identifier;
@Child(name = "effective", type = {DateTimeType.class, Period.class}, order=6, min=1, max=1)
@Description(shortDefinition="Clinically Relevant time/time-period for report", formalDefinition="The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself." )
protected Type effective;
/**
* The date and time that this version of the report was released from the source diagnostic service.
*/
@Child(name = "issued", type = {InstantType.class}, order=7, min=1, max=1)
@Description(shortDefinition="DateTime this version was released", formalDefinition="The date and time that this version of the report was released from the source diagnostic service." )
protected InstantType issued;
/**
* The diagnostic service that is responsible for issuing the report.
*/
@Child(name = "performer", type = {Practitioner.class, Organization.class}, order=8, min=1, max=1)
@Description(shortDefinition="Responsible Diagnostic Service", formalDefinition="The diagnostic service that is responsible for issuing the report." )
protected Reference performer;
/**
* The actual object that is the target of the reference (The diagnostic service that is responsible for issuing the report.)
*/
protected Resource performerTarget;
/**
* Details concerning a test requested.
*/
@Child(name = "requestDetail", type = {DiagnosticOrder.class}, order=7, min=0, max=Child.MAX_UNLIMITED)
@Child(name = "requestDetail", type = {DiagnosticOrder.class}, order=9, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="What was requested", formalDefinition="Details concerning a test requested." )
protected List<Reference> requestDetail;
/**
@ -436,20 +450,6 @@ public class DiagnosticReport extends DomainResource {
protected List<DiagnosticOrder> requestDetailTarget;
/**
* The section of the diagnostic service that performs the examination e.g. biochemistry, hematology, MRI.
*/
@Child(name = "serviceCategory", type = {CodeableConcept.class}, order=8, min=0, max=1)
@Description(shortDefinition="Biochemistry, Hematology etc.", formalDefinition="The section of the diagnostic service that performs the examination e.g. biochemistry, hematology, MRI." )
protected CodeableConcept serviceCategory;
/**
* The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.
*/
@Child(name = "effective", type = {DateTimeType.class, Period.class}, order=9, min=1, max=1)
@Description(shortDefinition="Clinically Relevant time/time-period for report", formalDefinition="The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself." )
protected Type effective;
/**
* Details about the specimens on which this diagnostic report is based.
*/
@ -514,7 +514,7 @@ public class DiagnosticReport extends DomainResource {
@Description(shortDefinition="Entire Report as issued", formalDefinition="Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent." )
protected List<Attachment> presentedForm;
private static final long serialVersionUID = 14484749L;
private static final long serialVersionUID = 488621746L;
/*
* Constructor
@ -526,37 +526,53 @@ public class DiagnosticReport extends DomainResource {
/*
* Constructor
*/
public DiagnosticReport(CodeableConcept code, Enumeration<DiagnosticReportStatus> status, InstantType issued, Reference subject, Reference performer, Type effective) {
public DiagnosticReport(Enumeration<DiagnosticReportStatus> status, CodeableConcept code, Reference subject, Type effective, InstantType issued, Reference performer) {
super();
this.code = code;
this.status = status;
this.issued = issued;
this.code = code;
this.subject = subject;
this.performer = performer;
this.effective = effective;
this.issued = issued;
this.performer = performer;
}
/**
* @return {@link #code} (A code or name that describes this diagnostic report.)
* @return {@link #identifier} (The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.)
*/
public CodeableConcept getCode() {
if (this.code == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DiagnosticReport.code");
else if (Configuration.doAutoCreate())
this.code = new CodeableConcept(); // cc
return this.code;
public List<Identifier> getIdentifier() {
if (this.identifier == null)
this.identifier = new ArrayList<Identifier>();
return this.identifier;
}
public boolean hasCode() {
return this.code != null && !this.code.isEmpty();
public boolean hasIdentifier() {
if (this.identifier == null)
return false;
for (Identifier item : this.identifier)
if (!item.isEmpty())
return true;
return false;
}
/**
* @param value {@link #code} (A code or name that describes this diagnostic report.)
* @return {@link #identifier} (The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.)
*/
public DiagnosticReport setCode(CodeableConcept value) {
this.code = value;
// syntactic sugar
public Identifier addIdentifier() { //3
Identifier t = new Identifier();
if (this.identifier == null)
this.identifier = new ArrayList<Identifier>();
this.identifier.add(t);
return t;
}
// syntactic sugar
public DiagnosticReport addIdentifier(Identifier t) { //3
if (t == null)
return this;
if (this.identifier == null)
this.identifier = new ArrayList<Identifier>();
this.identifier.add(t);
return this;
}
@ -606,47 +622,50 @@ public class DiagnosticReport extends DomainResource {
}
/**
* @return {@link #issued} (The date and time that this version of the report was released from the source diagnostic service.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value
* @return {@link #category} (A code that classifies the dlinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.)
*/
public InstantType getIssuedElement() {
if (this.issued == null)
public CodeableConcept getCategory() {
if (this.category == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DiagnosticReport.issued");
throw new Error("Attempt to auto-create DiagnosticReport.category");
else if (Configuration.doAutoCreate())
this.issued = new InstantType(); // bb
return this.issued;
this.category = new CodeableConcept(); // cc
return this.category;
}
public boolean hasIssuedElement() {
return this.issued != null && !this.issued.isEmpty();
}
public boolean hasIssued() {
return this.issued != null && !this.issued.isEmpty();
public boolean hasCategory() {
return this.category != null && !this.category.isEmpty();
}
/**
* @param value {@link #issued} (The date and time that this version of the report was released from the source diagnostic service.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value
* @param value {@link #category} (A code that classifies the dlinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.)
*/
public DiagnosticReport setIssuedElement(InstantType value) {
this.issued = value;
public DiagnosticReport setCategory(CodeableConcept value) {
this.category = value;
return this;
}
/**
* @return The date and time that this version of the report was released from the source diagnostic service.
* @return {@link #code} (A code or name that describes this diagnostic report.)
*/
public Date getIssued() {
return this.issued == null ? null : this.issued.getValue();
public CodeableConcept getCode() {
if (this.code == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DiagnosticReport.code");
else if (Configuration.doAutoCreate())
this.code = new CodeableConcept(); // cc
return this.code;
}
public boolean hasCode() {
return this.code != null && !this.code.isEmpty();
}
/**
* @param value The date and time that this version of the report was released from the source diagnostic service.
* @param value {@link #code} (A code or name that describes this diagnostic report.)
*/
public DiagnosticReport setIssued(Date value) {
if (this.issued == null)
this.issued = new InstantType();
this.issued.setValue(value);
public DiagnosticReport setCode(CodeableConcept value) {
this.code = value;
return this;
}
@ -689,45 +708,6 @@ public class DiagnosticReport extends DomainResource {
return this;
}
/**
* @return {@link #performer} (The diagnostic service that is responsible for issuing the report.)
*/
public Reference getPerformer() {
if (this.performer == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DiagnosticReport.performer");
else if (Configuration.doAutoCreate())
this.performer = new Reference(); // cc
return this.performer;
}
public boolean hasPerformer() {
return this.performer != null && !this.performer.isEmpty();
}
/**
* @param value {@link #performer} (The diagnostic service that is responsible for issuing the report.)
*/
public DiagnosticReport setPerformer(Reference value) {
this.performer = value;
return this;
}
/**
* @return {@link #performer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The diagnostic service that is responsible for issuing the report.)
*/
public Resource getPerformerTarget() {
return this.performerTarget;
}
/**
* @param value {@link #performer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The diagnostic service that is responsible for issuing the report.)
*/
public DiagnosticReport setPerformerTarget(Resource value) {
this.performerTarget = value;
return this;
}
/**
* @return {@link #encounter} (The link to the health care event (encounter) when the order was made.)
*/
@ -773,42 +753,131 @@ public class DiagnosticReport extends DomainResource {
}
/**
* @return {@link #identifier} (The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.)
* @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.)
*/
public List<Identifier> getIdentifier() {
if (this.identifier == null)
this.identifier = new ArrayList<Identifier>();
return this.identifier;
}
public boolean hasIdentifier() {
if (this.identifier == null)
return false;
for (Identifier item : this.identifier)
if (!item.isEmpty())
return true;
return false;
public Type getEffective() {
return this.effective;
}
/**
* @return {@link #identifier} (The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.)
* @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.)
*/
// syntactic sugar
public Identifier addIdentifier() { //3
Identifier t = new Identifier();
if (this.identifier == null)
this.identifier = new ArrayList<Identifier>();
this.identifier.add(t);
return t;
public DateTimeType getEffectiveDateTimeType() throws Exception {
if (!(this.effective instanceof DateTimeType))
throw new Exception("Type mismatch: the type DateTimeType was expected, but "+this.effective.getClass().getName()+" was encountered");
return (DateTimeType) this.effective;
}
// syntactic sugar
public DiagnosticReport addIdentifier(Identifier t) { //3
if (t == null)
return this;
if (this.identifier == null)
this.identifier = new ArrayList<Identifier>();
this.identifier.add(t);
public boolean hasEffectiveDateTimeType() throws Exception {
return this.effective instanceof DateTimeType;
}
/**
* @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.)
*/
public Period getEffectivePeriod() throws Exception {
if (!(this.effective instanceof Period))
throw new Exception("Type mismatch: the type Period was expected, but "+this.effective.getClass().getName()+" was encountered");
return (Period) this.effective;
}
public boolean hasEffectivePeriod() throws Exception {
return this.effective instanceof Period;
}
public boolean hasEffective() {
return this.effective != null && !this.effective.isEmpty();
}
/**
* @param value {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.)
*/
public DiagnosticReport setEffective(Type value) {
this.effective = value;
return this;
}
/**
* @return {@link #issued} (The date and time that this version of the report was released from the source diagnostic service.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value
*/
public InstantType getIssuedElement() {
if (this.issued == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DiagnosticReport.issued");
else if (Configuration.doAutoCreate())
this.issued = new InstantType(); // bb
return this.issued;
}
public boolean hasIssuedElement() {
return this.issued != null && !this.issued.isEmpty();
}
public boolean hasIssued() {
return this.issued != null && !this.issued.isEmpty();
}
/**
* @param value {@link #issued} (The date and time that this version of the report was released from the source diagnostic service.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value
*/
public DiagnosticReport setIssuedElement(InstantType value) {
this.issued = value;
return this;
}
/**
* @return The date and time that this version of the report was released from the source diagnostic service.
*/
public Date getIssued() {
return this.issued == null ? null : this.issued.getValue();
}
/**
* @param value The date and time that this version of the report was released from the source diagnostic service.
*/
public DiagnosticReport setIssued(Date value) {
if (this.issued == null)
this.issued = new InstantType();
this.issued.setValue(value);
return this;
}
/**
* @return {@link #performer} (The diagnostic service that is responsible for issuing the report.)
*/
public Reference getPerformer() {
if (this.performer == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DiagnosticReport.performer");
else if (Configuration.doAutoCreate())
this.performer = new Reference(); // cc
return this.performer;
}
public boolean hasPerformer() {
return this.performer != null && !this.performer.isEmpty();
}
/**
* @param value {@link #performer} (The diagnostic service that is responsible for issuing the report.)
*/
public DiagnosticReport setPerformer(Reference value) {
this.performer = value;
return this;
}
/**
* @return {@link #performer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The diagnostic service that is responsible for issuing the report.)
*/
public Resource getPerformerTarget() {
return this.performerTarget;
}
/**
* @param value {@link #performer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The diagnostic service that is responsible for issuing the report.)
*/
public DiagnosticReport setPerformerTarget(Resource value) {
this.performerTarget = value;
return this;
}
@ -873,75 +942,6 @@ public class DiagnosticReport extends DomainResource {
return r;
}
/**
* @return {@link #serviceCategory} (The section of the diagnostic service that performs the examination e.g. biochemistry, hematology, MRI.)
*/
public CodeableConcept getServiceCategory() {
if (this.serviceCategory == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DiagnosticReport.serviceCategory");
else if (Configuration.doAutoCreate())
this.serviceCategory = new CodeableConcept(); // cc
return this.serviceCategory;
}
public boolean hasServiceCategory() {
return this.serviceCategory != null && !this.serviceCategory.isEmpty();
}
/**
* @param value {@link #serviceCategory} (The section of the diagnostic service that performs the examination e.g. biochemistry, hematology, MRI.)
*/
public DiagnosticReport setServiceCategory(CodeableConcept value) {
this.serviceCategory = value;
return this;
}
/**
* @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.)
*/
public Type getEffective() {
return this.effective;
}
/**
* @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.)
*/
public DateTimeType getEffectiveDateTimeType() throws Exception {
if (!(this.effective instanceof DateTimeType))
throw new Exception("Type mismatch: the type DateTimeType was expected, but "+this.effective.getClass().getName()+" was encountered");
return (DateTimeType) this.effective;
}
public boolean hasEffectiveDateTimeType() throws Exception {
return this.effective instanceof DateTimeType;
}
/**
* @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.)
*/
public Period getEffectivePeriod() throws Exception {
if (!(this.effective instanceof Period))
throw new Exception("Type mismatch: the type Period was expected, but "+this.effective.getClass().getName()+" was encountered");
return (Period) this.effective;
}
public boolean hasEffectivePeriod() throws Exception {
return this.effective instanceof Period;
}
public boolean hasEffective() {
return this.effective != null && !this.effective.isEmpty();
}
/**
* @param value {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.)
*/
public DiagnosticReport setEffective(Type value) {
this.effective = value;
return this;
}
/**
* @return {@link #specimen} (Details about the specimens on which this diagnostic report is based.)
*/
@ -1284,16 +1284,16 @@ public class DiagnosticReport extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("code", "CodeableConcept", "A code or name that describes this diagnostic report.", 0, java.lang.Integer.MAX_VALUE, code));
childrenList.add(new Property("status", "code", "The status of the diagnostic report as a whole.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("issued", "instant", "The date and time that this version of the report was released from the source diagnostic service.", 0, java.lang.Integer.MAX_VALUE, issued));
childrenList.add(new Property("subject", "Reference(Patient|Group|Device|Location)", "The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.", 0, java.lang.Integer.MAX_VALUE, subject));
childrenList.add(new Property("performer", "Reference(Practitioner|Organization)", "The diagnostic service that is responsible for issuing the report.", 0, java.lang.Integer.MAX_VALUE, performer));
childrenList.add(new Property("encounter", "Reference(Encounter)", "The link to the health care event (encounter) when the order was made.", 0, java.lang.Integer.MAX_VALUE, encounter));
childrenList.add(new Property("identifier", "Identifier", "The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("requestDetail", "Reference(DiagnosticOrder)", "Details concerning a test requested.", 0, java.lang.Integer.MAX_VALUE, requestDetail));
childrenList.add(new Property("serviceCategory", "CodeableConcept", "The section of the diagnostic service that performs the examination e.g. biochemistry, hematology, MRI.", 0, java.lang.Integer.MAX_VALUE, serviceCategory));
childrenList.add(new Property("status", "code", "The status of the diagnostic report as a whole.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("category", "CodeableConcept", "A code that classifies the dlinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.", 0, java.lang.Integer.MAX_VALUE, category));
childrenList.add(new Property("code", "CodeableConcept", "A code or name that describes this diagnostic report.", 0, java.lang.Integer.MAX_VALUE, code));
childrenList.add(new Property("subject", "Reference(Patient|Group|Device|Location)", "The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.", 0, java.lang.Integer.MAX_VALUE, subject));
childrenList.add(new Property("encounter", "Reference(Encounter)", "The link to the health care event (encounter) when the order was made.", 0, java.lang.Integer.MAX_VALUE, encounter));
childrenList.add(new Property("effective[x]", "dateTime|Period", "The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", 0, java.lang.Integer.MAX_VALUE, effective));
childrenList.add(new Property("issued", "instant", "The date and time that this version of the report was released from the source diagnostic service.", 0, java.lang.Integer.MAX_VALUE, issued));
childrenList.add(new Property("performer", "Reference(Practitioner|Organization)", "The diagnostic service that is responsible for issuing the report.", 0, java.lang.Integer.MAX_VALUE, performer));
childrenList.add(new Property("requestDetail", "Reference(DiagnosticOrder)", "Details concerning a test requested.", 0, java.lang.Integer.MAX_VALUE, requestDetail));
childrenList.add(new Property("specimen", "Reference(Specimen)", "Details about the specimens on which this diagnostic report is based.", 0, java.lang.Integer.MAX_VALUE, specimen));
childrenList.add(new Property("result", "Reference(Observation)", "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. 'atomic' results), or they can be grouping observations that include references to other members of the group (e.g. 'panels').", 0, java.lang.Integer.MAX_VALUE, result));
childrenList.add(new Property("imagingStudy", "Reference(ImagingStudy|ImagingObjectSelection)", "One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.", 0, java.lang.Integer.MAX_VALUE, imagingStudy));
@ -1306,24 +1306,24 @@ public class DiagnosticReport extends DomainResource {
public DiagnosticReport copy() {
DiagnosticReport dst = new DiagnosticReport();
copyValues(dst);
dst.code = code == null ? null : code.copy();
dst.status = status == null ? null : status.copy();
dst.issued = issued == null ? null : issued.copy();
dst.subject = subject == null ? null : subject.copy();
dst.performer = performer == null ? null : performer.copy();
dst.encounter = encounter == null ? null : encounter.copy();
if (identifier != null) {
dst.identifier = new ArrayList<Identifier>();
for (Identifier i : identifier)
dst.identifier.add(i.copy());
};
dst.status = status == null ? null : status.copy();
dst.category = category == null ? null : category.copy();
dst.code = code == null ? null : code.copy();
dst.subject = subject == null ? null : subject.copy();
dst.encounter = encounter == null ? null : encounter.copy();
dst.effective = effective == null ? null : effective.copy();
dst.issued = issued == null ? null : issued.copy();
dst.performer = performer == null ? null : performer.copy();
if (requestDetail != null) {
dst.requestDetail = new ArrayList<Reference>();
for (Reference i : requestDetail)
dst.requestDetail.add(i.copy());
};
dst.serviceCategory = serviceCategory == null ? null : serviceCategory.copy();
dst.effective = effective == null ? null : effective.copy();
if (specimen != null) {
dst.specimen = new ArrayList<Reference>();
for (Reference i : specimen)
@ -1369,12 +1369,12 @@ public class DiagnosticReport extends DomainResource {
if (!(other instanceof DiagnosticReport))
return false;
DiagnosticReport o = (DiagnosticReport) other;
return compareDeep(code, o.code, true) && compareDeep(status, o.status, true) && compareDeep(issued, o.issued, true)
&& compareDeep(subject, o.subject, true) && compareDeep(performer, o.performer, true) && compareDeep(encounter, o.encounter, true)
&& compareDeep(identifier, o.identifier, true) && compareDeep(requestDetail, o.requestDetail, true)
&& compareDeep(serviceCategory, o.serviceCategory, true) && compareDeep(effective, o.effective, true)
&& compareDeep(specimen, o.specimen, true) && compareDeep(result, o.result, true) && compareDeep(imagingStudy, o.imagingStudy, true)
&& compareDeep(image, o.image, true) && compareDeep(conclusion, o.conclusion, true) && compareDeep(codedDiagnosis, o.codedDiagnosis, true)
return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(category, o.category, true)
&& compareDeep(code, o.code, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true)
&& compareDeep(effective, o.effective, true) && compareDeep(issued, o.issued, true) && compareDeep(performer, o.performer, true)
&& compareDeep(requestDetail, o.requestDetail, true) && compareDeep(specimen, o.specimen, true)
&& compareDeep(result, o.result, true) && compareDeep(imagingStudy, o.imagingStudy, true) && compareDeep(image, o.image, true)
&& compareDeep(conclusion, o.conclusion, true) && compareDeep(codedDiagnosis, o.codedDiagnosis, true)
&& compareDeep(presentedForm, o.presentedForm, true);
}
@ -1390,12 +1390,11 @@ public class DiagnosticReport extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (status == null || status.isEmpty())
&& (issued == null || issued.isEmpty()) && (subject == null || subject.isEmpty()) && (performer == null || performer.isEmpty())
&& (encounter == null || encounter.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (requestDetail == null || requestDetail.isEmpty()) && (serviceCategory == null || serviceCategory.isEmpty())
&& (effective == null || effective.isEmpty()) && (specimen == null || specimen.isEmpty())
&& (result == null || result.isEmpty()) && (imagingStudy == null || imagingStudy.isEmpty())
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (category == null || category.isEmpty()) && (code == null || code.isEmpty()) && (subject == null || subject.isEmpty())
&& (encounter == null || encounter.isEmpty()) && (effective == null || effective.isEmpty())
&& (issued == null || issued.isEmpty()) && (performer == null || performer.isEmpty()) && (requestDetail == null || requestDetail.isEmpty())
&& (specimen == null || specimen.isEmpty()) && (result == null || result.isEmpty()) && (imagingStudy == null || imagingStudy.isEmpty())
&& (image == null || image.isEmpty()) && (conclusion == null || conclusion.isEmpty()) && (codedDiagnosis == null || codedDiagnosis.isEmpty())
&& (presentedForm == null || presentedForm.isEmpty());
}
@ -1425,14 +1424,14 @@ public class DiagnosticReport extends DomainResource {
public static final String SP_ENCOUNTER = "encounter";
@SearchParamDefinition(name="result", path="DiagnosticReport.result", description="Link to an atomic result (observation resource)", type="reference" )
public static final String SP_RESULT = "result";
@SearchParamDefinition(name="service", path="DiagnosticReport.serviceCategory", description="Which diagnostic discipline/department created the report", type="token" )
public static final String SP_SERVICE = "service";
@SearchParamDefinition(name="patient", path="DiagnosticReport.subject", description="The subject of the report if a patient", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="specimen", path="DiagnosticReport.specimen", description="The specimen details", type="reference" )
public static final String SP_SPECIMEN = "specimen";
@SearchParamDefinition(name="issued", path="DiagnosticReport.issued", description="When the report was issued", type="date" )
public static final String SP_ISSUED = "issued";
@SearchParamDefinition(name="category", path="DiagnosticReport.category", description="Which diagnostic discipline/department created the report", type="token" )
public static final String SP_CATEGORY = "category";
@SearchParamDefinition(name="status", path="DiagnosticReport.status", description="The status of the report", type="token" )
public static final String SP_STATUS = "status";

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import org.hl7.fhir.instance.model.annotations.DatatypeDef;
import org.hl7.fhir.instance.model.annotations.Block;
@ -40,14 +40,14 @@ import org.hl7.fhir.instance.model.api.*;
@DatatypeDef(name="Distance")
public class Distance extends Quantity {
private static final long serialVersionUID = -483422721L;
private static final long serialVersionUID = 1069574054L;
public Distance copy() {
Distance dst = new Distance();
copyValues(dst);
dst.value = value == null ? null : value.copy();
dst.comparator = comparator == null ? null : comparator.copy();
dst.units = units == null ? null : units.copy();
dst.unit = unit == null ? null : unit.copy();
dst.system = system == null ? null : system.copy();
dst.code = code == null ? null : code.copy();
return dst;
@ -64,7 +64,7 @@ public class Distance extends Quantity {
if (!(other instanceof Distance))
return false;
Distance o = (Distance) other;
return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(units, o.units, true)
return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(unit, o.unit, true)
&& compareDeep(system, o.system, true) && compareDeep(code, o.code, true);
}
@ -75,13 +75,13 @@ public class Distance extends Quantity {
if (!(other instanceof Distance))
return false;
Distance o = (Distance) other;
return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(units, o.units, true)
return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(unit, o.unit, true)
&& compareValues(system, o.system, true) && compareValues(code, o.code, true);
}
public boolean isEmpty() {
return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
&& (units == null || units.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
&& (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import org.hl7.fhir.instance.model.annotations.DatatypeDef;
import org.hl7.fhir.instance.model.annotations.Block;
@ -40,14 +40,14 @@ import org.hl7.fhir.instance.model.api.*;
@DatatypeDef(name="Duration")
public class Duration extends Quantity {
private static final long serialVersionUID = -483422721L;
private static final long serialVersionUID = 1069574054L;
public Duration copy() {
Duration dst = new Duration();
copyValues(dst);
dst.value = value == null ? null : value.copy();
dst.comparator = comparator == null ? null : comparator.copy();
dst.units = units == null ? null : units.copy();
dst.unit = unit == null ? null : unit.copy();
dst.system = system == null ? null : system.copy();
dst.code = code == null ? null : code.copy();
return dst;
@ -64,7 +64,7 @@ public class Duration extends Quantity {
if (!(other instanceof Duration))
return false;
Duration o = (Duration) other;
return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(units, o.units, true)
return compareDeep(value, o.value, true) && compareDeep(comparator, o.comparator, true) && compareDeep(unit, o.unit, true)
&& compareDeep(system, o.system, true) && compareDeep(code, o.code, true);
}
@ -75,13 +75,13 @@ public class Duration extends Quantity {
if (!(other instanceof Duration))
return false;
Duration o = (Duration) other;
return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(units, o.units, true)
return compareValues(value, o.value, true) && compareValues(comparator, o.comparator, true) && compareValues(unit, o.unit, true)
&& compareValues(system, o.system, true) && compareValues(code, o.code, true);
}
public boolean isEmpty() {
return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
&& (units == null || units.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
&& (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
}

View File

@ -29,17 +29,16 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.*;
import org.hl7.fhir.utilities.Utilities;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.instance.model.annotations.Child;
import org.hl7.fhir.instance.model.annotations.Description;
import org.hl7.fhir.instance.model.annotations.DatatypeDef;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.instance.model.annotations.Block;
import org.hl7.fhir.instance.model.api.*;
import org.hl7.fhir.instance.model.api.IBaseHasExtensions;
import org.hl7.fhir.utilities.Utilities;
/**
* Base definition for all elements in a resource.
*/

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -871,10 +871,10 @@ public class ElementDefinition extends Type implements ICompositeType {
protected CodeType code;
/**
* Identifies a profile structure that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them.
* Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.
*/
@Child(name = "profile", type = {UriType.class}, order=2, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Profile (StructureDefinition) to apply", formalDefinition="Identifies a profile structure that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them." )
@Description(shortDefinition="Profile (StructureDefinition) to apply (or IG)", formalDefinition="Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide." )
protected List<UriType> profile;
/**
@ -947,7 +947,7 @@ public class ElementDefinition extends Type implements ICompositeType {
}
/**
* @return {@link #profile} (Identifies a profile structure that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them.)
* @return {@link #profile} (Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.)
*/
public List<UriType> getProfile() {
if (this.profile == null)
@ -965,7 +965,7 @@ public class ElementDefinition extends Type implements ICompositeType {
}
/**
* @return {@link #profile} (Identifies a profile structure that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them.)
* @return {@link #profile} (Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.)
*/
// syntactic sugar
public UriType addProfileElement() {//2
@ -977,7 +977,7 @@ public class ElementDefinition extends Type implements ICompositeType {
}
/**
* @param value {@link #profile} (Identifies a profile structure that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them.)
* @param value {@link #profile} (Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.)
*/
public TypeRefComponent addProfile(String value) { //1
UriType t = new UriType();
@ -989,7 +989,7 @@ public class ElementDefinition extends Type implements ICompositeType {
}
/**
* @param value {@link #profile} (Identifies a profile structure that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them.)
* @param value {@link #profile} (Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.)
*/
public boolean hasProfile(String value) {
if (this.profile == null)
@ -1057,7 +1057,7 @@ public class ElementDefinition extends Type implements ICompositeType {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("code", "code", "Name of Data type or Resource that is a(or the) type used for this element.", 0, java.lang.Integer.MAX_VALUE, code));
childrenList.add(new Property("profile", "uri", "Identifies a profile structure that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them.", 0, java.lang.Integer.MAX_VALUE, profile));
childrenList.add(new Property("profile", "uri", "Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.", 0, java.lang.Integer.MAX_VALUE, profile));
childrenList.add(new Property("aggregation", "code", "If the type is a reference to another resource, how the resource is or can be aggreated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.", 0, java.lang.Integer.MAX_VALUE, aggregation));
}
@ -1928,10 +1928,10 @@ public class ElementDefinition extends Type implements ICompositeType {
protected List<Coding> code;
/**
* Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).
* Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).
*/
@Child(name = "slicing", type = {}, order=5, min=0, max=1)
@Description(shortDefinition="This element is sliced - slices follow", formalDefinition="Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)." )
@Description(shortDefinition="This element is sliced - slices follow", formalDefinition="Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)." )
protected ElementDefinitionSlicingComponent slicing;
/**
@ -1944,23 +1944,23 @@ public class ElementDefinition extends Type implements ICompositeType {
/**
* Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.
*/
@Child(name = "definition", type = {StringType.class}, order=7, min=0, max=1)
@Child(name = "definition", type = {MarkdownType.class}, order=7, min=0, max=1)
@Description(shortDefinition="Full formal definition as narrative text", formalDefinition="Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource." )
protected StringType definition;
protected MarkdownType definition;
/**
* Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.
*/
@Child(name = "comments", type = {StringType.class}, order=8, min=0, max=1)
@Child(name = "comments", type = {MarkdownType.class}, order=8, min=0, max=1)
@Description(shortDefinition="Comments about the use of this element", formalDefinition="Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc." )
protected StringType comments;
protected MarkdownType comments;
/**
* This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.
*/
@Child(name = "requirements", type = {StringType.class}, order=9, min=0, max=1)
@Child(name = "requirements", type = {MarkdownType.class}, order=9, min=0, max=1)
@Description(shortDefinition="Why is this needed?", formalDefinition="This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element." )
protected StringType requirements;
protected MarkdownType requirements;
/**
* Identifies additional names by which this element might also be known.
@ -2014,9 +2014,9 @@ public class ElementDefinition extends Type implements ICompositeType {
/**
* The Implicit meaning that is to be understood when this element is missing.
*/
@Child(name = "meaningWhenMissing", type = {StringType.class}, order=17, min=0, max=1)
@Child(name = "meaningWhenMissing", type = {MarkdownType.class}, order=17, min=0, max=1)
@Description(shortDefinition="Implicit meaning when this element is missing", formalDefinition="The Implicit meaning that is to be understood when this element is missing." )
protected StringType meaningWhenMissing;
protected MarkdownType meaningWhenMissing;
/**
* Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-signficant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.
@ -2075,10 +2075,10 @@ public class ElementDefinition extends Type implements ICompositeType {
protected List<ElementDefinitionConstraintComponent> constraint;
/**
* If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported.
* If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported.
*/
@Child(name = "mustSupport", type = {BooleanType.class}, order=26, min=0, max=1)
@Description(shortDefinition="If the element must supported", formalDefinition="If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported." )
@Description(shortDefinition="If the element must supported", formalDefinition="If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported." )
protected BooleanType mustSupport;
/**
@ -2109,7 +2109,7 @@ public class ElementDefinition extends Type implements ICompositeType {
@Description(shortDefinition="Map element to another set of definitions", formalDefinition="Identifies a concept from an external specification that roughly corresponds to this element." )
protected List<ElementDefinitionMappingComponent> mapping;
private static final long serialVersionUID = 1686845344L;
private static final long serialVersionUID = -2084587620L;
/*
* Constructor
@ -2364,7 +2364,7 @@ public class ElementDefinition extends Type implements ICompositeType {
}
/**
* @return {@link #slicing} (Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).)
* @return {@link #slicing} (Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).)
*/
public ElementDefinitionSlicingComponent getSlicing() {
if (this.slicing == null)
@ -2380,7 +2380,7 @@ public class ElementDefinition extends Type implements ICompositeType {
}
/**
* @param value {@link #slicing} (Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).)
* @param value {@link #slicing} (Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).)
*/
public ElementDefinition setSlicing(ElementDefinitionSlicingComponent value) {
this.slicing = value;
@ -2439,12 +2439,12 @@ public class ElementDefinition extends Type implements ICompositeType {
/**
* @return {@link #definition} (Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
*/
public StringType getDefinitionElement() {
public MarkdownType getDefinitionElement() {
if (this.definition == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ElementDefinition.definition");
else if (Configuration.doAutoCreate())
this.definition = new StringType(); // bb
this.definition = new MarkdownType(); // bb
return this.definition;
}
@ -2459,7 +2459,7 @@ public class ElementDefinition extends Type implements ICompositeType {
/**
* @param value {@link #definition} (Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
*/
public ElementDefinition setDefinitionElement(StringType value) {
public ElementDefinition setDefinitionElement(MarkdownType value) {
this.definition = value;
return this;
}
@ -2475,11 +2475,11 @@ public class ElementDefinition extends Type implements ICompositeType {
* @param value Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.
*/
public ElementDefinition setDefinition(String value) {
if (Utilities.noString(value))
if (value == null)
this.definition = null;
else {
if (this.definition == null)
this.definition = new StringType();
this.definition = new MarkdownType();
this.definition.setValue(value);
}
return this;
@ -2488,12 +2488,12 @@ public class ElementDefinition extends Type implements ICompositeType {
/**
* @return {@link #comments} (Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value
*/
public StringType getCommentsElement() {
public MarkdownType getCommentsElement() {
if (this.comments == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ElementDefinition.comments");
else if (Configuration.doAutoCreate())
this.comments = new StringType(); // bb
this.comments = new MarkdownType(); // bb
return this.comments;
}
@ -2508,7 +2508,7 @@ public class ElementDefinition extends Type implements ICompositeType {
/**
* @param value {@link #comments} (Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value
*/
public ElementDefinition setCommentsElement(StringType value) {
public ElementDefinition setCommentsElement(MarkdownType value) {
this.comments = value;
return this;
}
@ -2524,11 +2524,11 @@ public class ElementDefinition extends Type implements ICompositeType {
* @param value Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.
*/
public ElementDefinition setComments(String value) {
if (Utilities.noString(value))
if (value == null)
this.comments = null;
else {
if (this.comments == null)
this.comments = new StringType();
this.comments = new MarkdownType();
this.comments.setValue(value);
}
return this;
@ -2537,12 +2537,12 @@ public class ElementDefinition extends Type implements ICompositeType {
/**
* @return {@link #requirements} (This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value
*/
public StringType getRequirementsElement() {
public MarkdownType getRequirementsElement() {
if (this.requirements == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ElementDefinition.requirements");
else if (Configuration.doAutoCreate())
this.requirements = new StringType(); // bb
this.requirements = new MarkdownType(); // bb
return this.requirements;
}
@ -2557,7 +2557,7 @@ public class ElementDefinition extends Type implements ICompositeType {
/**
* @param value {@link #requirements} (This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value
*/
public ElementDefinition setRequirementsElement(StringType value) {
public ElementDefinition setRequirementsElement(MarkdownType value) {
this.requirements = value;
return this;
}
@ -2573,11 +2573,11 @@ public class ElementDefinition extends Type implements ICompositeType {
* @param value This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.
*/
public ElementDefinition setRequirements(String value) {
if (Utilities.noString(value))
if (value == null)
this.requirements = null;
else {
if (this.requirements == null)
this.requirements = new StringType();
this.requirements = new MarkdownType();
this.requirements.setValue(value);
}
return this;
@ -2866,12 +2866,12 @@ public class ElementDefinition extends Type implements ICompositeType {
/**
* @return {@link #meaningWhenMissing} (The Implicit meaning that is to be understood when this element is missing.). This is the underlying object with id, value and extensions. The accessor "getMeaningWhenMissing" gives direct access to the value
*/
public StringType getMeaningWhenMissingElement() {
public MarkdownType getMeaningWhenMissingElement() {
if (this.meaningWhenMissing == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ElementDefinition.meaningWhenMissing");
else if (Configuration.doAutoCreate())
this.meaningWhenMissing = new StringType(); // bb
this.meaningWhenMissing = new MarkdownType(); // bb
return this.meaningWhenMissing;
}
@ -2886,7 +2886,7 @@ public class ElementDefinition extends Type implements ICompositeType {
/**
* @param value {@link #meaningWhenMissing} (The Implicit meaning that is to be understood when this element is missing.). This is the underlying object with id, value and extensions. The accessor "getMeaningWhenMissing" gives direct access to the value
*/
public ElementDefinition setMeaningWhenMissingElement(StringType value) {
public ElementDefinition setMeaningWhenMissingElement(MarkdownType value) {
this.meaningWhenMissing = value;
return this;
}
@ -2902,11 +2902,11 @@ public class ElementDefinition extends Type implements ICompositeType {
* @param value The Implicit meaning that is to be understood when this element is missing.
*/
public ElementDefinition setMeaningWhenMissing(String value) {
if (Utilities.noString(value))
if (value == null)
this.meaningWhenMissing = null;
else {
if (this.meaningWhenMissing == null)
this.meaningWhenMissing = new StringType();
this.meaningWhenMissing = new MarkdownType();
this.meaningWhenMissing.setValue(value);
}
return this;
@ -3147,7 +3147,7 @@ public class ElementDefinition extends Type implements ICompositeType {
}
/**
* @return {@link #mustSupport} (If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported.). This is the underlying object with id, value and extensions. The accessor "getMustSupport" gives direct access to the value
* @return {@link #mustSupport} (If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported.). This is the underlying object with id, value and extensions. The accessor "getMustSupport" gives direct access to the value
*/
public BooleanType getMustSupportElement() {
if (this.mustSupport == null)
@ -3167,7 +3167,7 @@ public class ElementDefinition extends Type implements ICompositeType {
}
/**
* @param value {@link #mustSupport} (If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported.). This is the underlying object with id, value and extensions. The accessor "getMustSupport" gives direct access to the value
* @param value {@link #mustSupport} (If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported.). This is the underlying object with id, value and extensions. The accessor "getMustSupport" gives direct access to the value
*/
public ElementDefinition setMustSupportElement(BooleanType value) {
this.mustSupport = value;
@ -3175,14 +3175,14 @@ public class ElementDefinition extends Type implements ICompositeType {
}
/**
* @return If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported.
* @return If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported.
*/
public boolean getMustSupport() {
return this.mustSupport == null || this.mustSupport.isEmpty() ? false : this.mustSupport.getValue();
}
/**
* @param value If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported.
* @param value If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported.
*/
public ElementDefinition setMustSupport(boolean value) {
if (this.mustSupport == null)
@ -3352,11 +3352,11 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("name", "string", "The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.", 0, java.lang.Integer.MAX_VALUE, name));
childrenList.add(new Property("label", "string", "The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.", 0, java.lang.Integer.MAX_VALUE, label));
childrenList.add(new Property("code", "Coding", "A code that provides the meaning for the element according to a particular terminology.", 0, java.lang.Integer.MAX_VALUE, code));
childrenList.add(new Property("slicing", "", "Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).", 0, java.lang.Integer.MAX_VALUE, slicing));
childrenList.add(new Property("slicing", "", "Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).", 0, java.lang.Integer.MAX_VALUE, slicing));
childrenList.add(new Property("short", "string", "A concise definition that is shown in the generated XML format that summarizes profiles (used throughout the specification).", 0, java.lang.Integer.MAX_VALUE, short_));
childrenList.add(new Property("definition", "string", "Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.", 0, java.lang.Integer.MAX_VALUE, definition));
childrenList.add(new Property("comments", "string", "Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.", 0, java.lang.Integer.MAX_VALUE, comments));
childrenList.add(new Property("requirements", "string", "This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.", 0, java.lang.Integer.MAX_VALUE, requirements));
childrenList.add(new Property("definition", "markdown", "Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.", 0, java.lang.Integer.MAX_VALUE, definition));
childrenList.add(new Property("comments", "markdown", "Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.", 0, java.lang.Integer.MAX_VALUE, comments));
childrenList.add(new Property("requirements", "markdown", "This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.", 0, java.lang.Integer.MAX_VALUE, requirements));
childrenList.add(new Property("alias", "string", "Identifies additional names by which this element might also be known.", 0, java.lang.Integer.MAX_VALUE, alias));
childrenList.add(new Property("min", "integer", "The minimum number of times this element SHALL appear in the instance.", 0, java.lang.Integer.MAX_VALUE, min));
childrenList.add(new Property("max", "string", "The maximum number of times this element is permitted to appear in the instance.", 0, java.lang.Integer.MAX_VALUE, max));
@ -3364,7 +3364,7 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("type", "", "The data type or resource that the value of this element is permitted to be.", 0, java.lang.Integer.MAX_VALUE, type));
childrenList.add(new Property("nameReference", "string", "Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.", 0, java.lang.Integer.MAX_VALUE, nameReference));
childrenList.add(new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance.", 0, java.lang.Integer.MAX_VALUE, defaultValue));
childrenList.add(new Property("meaningWhenMissing", "string", "The Implicit meaning that is to be understood when this element is missing.", 0, java.lang.Integer.MAX_VALUE, meaningWhenMissing));
childrenList.add(new Property("meaningWhenMissing", "markdown", "The Implicit meaning that is to be understood when this element is missing.", 0, java.lang.Integer.MAX_VALUE, meaningWhenMissing));
childrenList.add(new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-signficant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, java.lang.Integer.MAX_VALUE, fixed));
childrenList.add(new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-senstive, accent-sensitive, etc.).", 0, java.lang.Integer.MAX_VALUE, pattern));
childrenList.add(new Property("example[x]", "*", "A sample value for this element demonstrating the type of information that would typically be captured.", 0, java.lang.Integer.MAX_VALUE, example));
@ -3373,7 +3373,7 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("maxLength", "integer", "Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.", 0, java.lang.Integer.MAX_VALUE, maxLength));
childrenList.add(new Property("condition", "id", "A reference to an invariant that may make additional statements about the cardinality or value in the instance.", 0, java.lang.Integer.MAX_VALUE, condition));
childrenList.add(new Property("constraint", "", "Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.", 0, java.lang.Integer.MAX_VALUE, constraint));
childrenList.add(new Property("mustSupport", "boolean", "If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported.", 0, java.lang.Integer.MAX_VALUE, mustSupport));
childrenList.add(new Property("mustSupport", "boolean", "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", 0, java.lang.Integer.MAX_VALUE, mustSupport));
childrenList.add(new Property("isModifier", "boolean", "If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.", 0, java.lang.Integer.MAX_VALUE, isModifier));
childrenList.add(new Property("isSummary", "boolean", "Whether the element should be included if a client requests a search with the parameter _summary=true.", 0, java.lang.Integer.MAX_VALUE, isSummary));
childrenList.add(new Property("binding", "", "Binds to a value set if this element is coded (code, Coding, CodeableConcept).", 0, java.lang.Integer.MAX_VALUE, binding));

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import org.hl7.fhir.instance.model.api.*;
@ -671,6 +671,10 @@ public class Enumerations {
* Some system or workflow process error means that the information is not available
*/
ERROR,
/**
* NaN, standing for not a number, is a numeric data type value representing an undefined or unrepresentable value
*/
NAN,
/**
* added to help the parsers
*/
@ -694,6 +698,8 @@ public class Enumerations {
return ASTEXT;
if ("error".equals(codeString))
return ERROR;
if ("NaN".equals(codeString))
return NAN;
throw new Exception("Unknown DataAbsentReason code '"+codeString+"'");
}
public String toCode() {
@ -706,6 +712,7 @@ public class Enumerations {
case UNSUPPORTED: return "unsupported";
case ASTEXT: return "astext";
case ERROR: return "error";
case NAN: return "NaN";
default: return "?";
}
}
@ -719,6 +726,7 @@ public class Enumerations {
case UNSUPPORTED: return "http://hl7.org/fhir/data-absent-reason";
case ASTEXT: return "http://hl7.org/fhir/data-absent-reason";
case ERROR: return "http://hl7.org/fhir/data-absent-reason";
case NAN: return "http://hl7.org/fhir/data-absent-reason";
default: return "?";
}
}
@ -732,6 +740,7 @@ public class Enumerations {
case UNSUPPORTED: return "The source system wasn't capable of supporting this element";
case ASTEXT: return "The content of the data is represented in the resource narrative";
case ERROR: return "Some system or workflow process error means that the information is not available";
case NAN: return "NaN, standing for not a number, is a numeric data type value representing an undefined or unrepresentable value";
default: return "?";
}
}
@ -745,6 +754,7 @@ public class Enumerations {
case UNSUPPORTED: return "Unsupported";
case ASTEXT: return "As Text";
case ERROR: return "Error";
case NAN: return "Not a Number";
default: return "?";
}
}
@ -771,6 +781,8 @@ public class Enumerations {
return DataAbsentReason.ASTEXT;
if ("error".equals(codeString))
return DataAbsentReason.ERROR;
if ("NaN".equals(codeString))
return DataAbsentReason.NAN;
throw new IllegalArgumentException("Unknown DataAbsentReason code '"+codeString+"'");
}
public String toCode(DataAbsentReason code) {
@ -790,6 +802,8 @@ public class Enumerations {
return "astext";
if (code == DataAbsentReason.ERROR)
return "error";
if (code == DataAbsentReason.NAN)
return "NaN";
return "?";
}
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -172,10 +172,22 @@ public class Flag extends DomainResource {
*/
protected Resource subjectTarget;
/**
* This alert is only relevant during the encounter.
*/
@Child(name = "encounter", type = {Encounter.class}, order=5, min=0, max=1)
@Description(shortDefinition="Alert relevant during encounter", formalDefinition="This alert is only relevant during the encounter." )
protected Reference encounter;
/**
* The actual object that is the target of the reference (This alert is only relevant during the encounter.)
*/
protected Encounter encounterTarget;
/**
* The person or device that created the flag.
*/
@Child(name = "author", type = {Practitioner.class, Patient.class, Device.class}, order=5, min=0, max=1)
@Child(name = "author", type = {Practitioner.class, Patient.class, Device.class}, order=6, min=0, max=1)
@Description(shortDefinition="Flag creator", formalDefinition="The person or device that created the flag." )
protected Reference author;
@ -187,11 +199,11 @@ public class Flag extends DomainResource {
/**
* The coded value or textual component of the flag to display to the user.
*/
@Child(name = "code", type = {CodeableConcept.class}, order=6, min=1, max=1)
@Child(name = "code", type = {CodeableConcept.class}, order=7, min=1, max=1)
@Description(shortDefinition="Partially deaf, Requires easy open caps, No permanent address, etc.", formalDefinition="The coded value or textual component of the flag to display to the user." )
protected CodeableConcept code;
private static final long serialVersionUID = -48488440L;
private static final long serialVersionUID = 701147751L;
/*
* Constructor
@ -382,6 +394,50 @@ public class Flag extends DomainResource {
return this;
}
/**
* @return {@link #encounter} (This alert is only relevant during the encounter.)
*/
public Reference getEncounter() {
if (this.encounter == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Flag.encounter");
else if (Configuration.doAutoCreate())
this.encounter = new Reference(); // cc
return this.encounter;
}
public boolean hasEncounter() {
return this.encounter != null && !this.encounter.isEmpty();
}
/**
* @param value {@link #encounter} (This alert is only relevant during the encounter.)
*/
public Flag setEncounter(Reference value) {
this.encounter = value;
return this;
}
/**
* @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (This alert is only relevant during the encounter.)
*/
public Encounter getEncounterTarget() {
if (this.encounterTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Flag.encounter");
else if (Configuration.doAutoCreate())
this.encounterTarget = new Encounter(); // aa
return this.encounterTarget;
}
/**
* @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (This alert is only relevant during the encounter.)
*/
public Flag setEncounterTarget(Encounter value) {
this.encounterTarget = value;
return this;
}
/**
* @return {@link #author} (The person or device that created the flag.)
*/
@ -452,6 +508,7 @@ public class Flag extends DomainResource {
childrenList.add(new Property("status", "code", "Supports basic workflow.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("period", "Period", "The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.", 0, java.lang.Integer.MAX_VALUE, period));
childrenList.add(new Property("subject", "Reference(Patient|Location|Group|Organization|Practitioner)", "The patient, location, group , organization , or practitioner this is about record this flag is associated with.", 0, java.lang.Integer.MAX_VALUE, subject));
childrenList.add(new Property("encounter", "Reference(Encounter)", "This alert is only relevant during the encounter.", 0, java.lang.Integer.MAX_VALUE, encounter));
childrenList.add(new Property("author", "Reference(Practitioner|Patient|Device)", "The person or device that created the flag.", 0, java.lang.Integer.MAX_VALUE, author));
childrenList.add(new Property("code", "CodeableConcept", "The coded value or textual component of the flag to display to the user.", 0, java.lang.Integer.MAX_VALUE, code));
}
@ -468,6 +525,7 @@ public class Flag extends DomainResource {
dst.status = status == null ? null : status.copy();
dst.period = period == null ? null : period.copy();
dst.subject = subject == null ? null : subject.copy();
dst.encounter = encounter == null ? null : encounter.copy();
dst.author = author == null ? null : author.copy();
dst.code = code == null ? null : code.copy();
return dst;
@ -485,8 +543,8 @@ public class Flag extends DomainResource {
return false;
Flag o = (Flag) other;
return compareDeep(identifier, o.identifier, true) && compareDeep(category, o.category, true) && compareDeep(status, o.status, true)
&& compareDeep(period, o.period, true) && compareDeep(subject, o.subject, true) && compareDeep(author, o.author, true)
&& compareDeep(code, o.code, true);
&& compareDeep(period, o.period, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true)
&& compareDeep(author, o.author, true) && compareDeep(code, o.code, true);
}
@Override
@ -502,7 +560,8 @@ public class Flag extends DomainResource {
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty())
&& (status == null || status.isEmpty()) && (period == null || period.isEmpty()) && (subject == null || subject.isEmpty())
&& (author == null || author.isEmpty()) && (code == null || code.isEmpty());
&& (encounter == null || encounter.isEmpty()) && (author == null || author.isEmpty()) && (code == null || code.isEmpty())
;
}
@Override
@ -518,6 +577,8 @@ public class Flag extends DomainResource {
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="author", path="Flag.author", description="Flag creator", type="reference" )
public static final String SP_AUTHOR = "author";
@SearchParamDefinition(name="encounter", path="Flag.encounter", description="Alert relevant during encounter", type="reference" )
public static final String SP_ENCOUNTER = "encounter";
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -197,7 +197,14 @@ public class Group extends DomainResource {
@Description(shortDefinition="Group includes or excludes", formalDefinition="If true, indicates the characteristic is one that is NOT held by members of the group." )
protected BooleanType exclude;
private static final long serialVersionUID = 803478031L;
/**
* The period over which the characteristic is tested. E.g. the patient had an operation during the month of June.
*/
@Child(name = "period", type = {Period.class}, order=4, min=0, max=1)
@Description(shortDefinition="Period over which characteristic is tested", formalDefinition="The period over which the characteristic is tested. E.g. the patient had an operation during the month of June." )
protected Period period;
private static final long serialVersionUID = -1000688967L;
/*
* Constructor
@ -356,11 +363,36 @@ public class Group extends DomainResource {
return this;
}
/**
* @return {@link #period} (The period over which the characteristic is tested. E.g. the patient had an operation during the month of June.)
*/
public Period getPeriod() {
if (this.period == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create GroupCharacteristicComponent.period");
else if (Configuration.doAutoCreate())
this.period = new Period(); // cc
return this.period;
}
public boolean hasPeriod() {
return this.period != null && !this.period.isEmpty();
}
/**
* @param value {@link #period} (The period over which the characteristic is tested. E.g. the patient had an operation during the month of June.)
*/
public GroupCharacteristicComponent setPeriod(Period value) {
this.period = value;
return this;
}
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("code", "CodeableConcept", "A code that identifies the kind of trait being asserted.", 0, java.lang.Integer.MAX_VALUE, code));
childrenList.add(new Property("value[x]", "CodeableConcept|boolean|Quantity|Range", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, java.lang.Integer.MAX_VALUE, value));
childrenList.add(new Property("exclude", "boolean", "If true, indicates the characteristic is one that is NOT held by members of the group.", 0, java.lang.Integer.MAX_VALUE, exclude));
childrenList.add(new Property("period", "Period", "The period over which the characteristic is tested. E.g. the patient had an operation during the month of June.", 0, java.lang.Integer.MAX_VALUE, period));
}
public GroupCharacteristicComponent copy() {
@ -369,6 +401,7 @@ public class Group extends DomainResource {
dst.code = code == null ? null : code.copy();
dst.value = value == null ? null : value.copy();
dst.exclude = exclude == null ? null : exclude.copy();
dst.period = period == null ? null : period.copy();
return dst;
}
@ -380,7 +413,7 @@ public class Group extends DomainResource {
return false;
GroupCharacteristicComponent o = (GroupCharacteristicComponent) other;
return compareDeep(code, o.code, true) && compareDeep(value, o.value, true) && compareDeep(exclude, o.exclude, true)
;
&& compareDeep(period, o.period, true);
}
@Override
@ -395,7 +428,204 @@ public class Group extends DomainResource {
public boolean isEmpty() {
return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty())
&& (exclude == null || exclude.isEmpty());
&& (exclude == null || exclude.isEmpty()) && (period == null || period.isEmpty());
}
}
@Block()
public static class GroupMemberComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A reference to the entity that is a member of the group. Must be consistent with Group.type.
*/
@Child(name = "entity", type = {Patient.class, Practitioner.class, Device.class, Medication.class, Substance.class}, order=1, min=1, max=1)
@Description(shortDefinition="Reference to the group member", formalDefinition="A reference to the entity that is a member of the group. Must be consistent with Group.type." )
protected Reference entity;
/**
* The actual object that is the target of the reference (A reference to the entity that is a member of the group. Must be consistent with Group.type.)
*/
protected Resource entityTarget;
/**
* The period that the member was in the group, if known.
*/
@Child(name = "period", type = {Period.class}, order=2, min=0, max=1)
@Description(shortDefinition="Period member belonged to the group", formalDefinition="The period that the member was in the group, if known." )
protected Period period;
/**
* A flag to indicate that the member is no longer in the group, but previously may have been a member.
*/
@Child(name = "inactive", type = {BooleanType.class}, order=3, min=0, max=1)
@Description(shortDefinition="If member is no longer in group", formalDefinition="A flag to indicate that the member is no longer in the group, but previously may have been a member." )
protected BooleanType inactive;
private static final long serialVersionUID = -333869055L;
/*
* Constructor
*/
public GroupMemberComponent() {
super();
}
/*
* Constructor
*/
public GroupMemberComponent(Reference entity) {
super();
this.entity = entity;
}
/**
* @return {@link #entity} (A reference to the entity that is a member of the group. Must be consistent with Group.type.)
*/
public Reference getEntity() {
if (this.entity == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create GroupMemberComponent.entity");
else if (Configuration.doAutoCreate())
this.entity = new Reference(); // cc
return this.entity;
}
public boolean hasEntity() {
return this.entity != null && !this.entity.isEmpty();
}
/**
* @param value {@link #entity} (A reference to the entity that is a member of the group. Must be consistent with Group.type.)
*/
public GroupMemberComponent setEntity(Reference value) {
this.entity = value;
return this;
}
/**
* @return {@link #entity} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the entity that is a member of the group. Must be consistent with Group.type.)
*/
public Resource getEntityTarget() {
return this.entityTarget;
}
/**
* @param value {@link #entity} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the entity that is a member of the group. Must be consistent with Group.type.)
*/
public GroupMemberComponent setEntityTarget(Resource value) {
this.entityTarget = value;
return this;
}
/**
* @return {@link #period} (The period that the member was in the group, if known.)
*/
public Period getPeriod() {
if (this.period == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create GroupMemberComponent.period");
else if (Configuration.doAutoCreate())
this.period = new Period(); // cc
return this.period;
}
public boolean hasPeriod() {
return this.period != null && !this.period.isEmpty();
}
/**
* @param value {@link #period} (The period that the member was in the group, if known.)
*/
public GroupMemberComponent setPeriod(Period value) {
this.period = value;
return this;
}
/**
* @return {@link #inactive} (A flag to indicate that the member is no longer in the group, but previously may have been a member.). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value
*/
public BooleanType getInactiveElement() {
if (this.inactive == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create GroupMemberComponent.inactive");
else if (Configuration.doAutoCreate())
this.inactive = new BooleanType(); // bb
return this.inactive;
}
public boolean hasInactiveElement() {
return this.inactive != null && !this.inactive.isEmpty();
}
public boolean hasInactive() {
return this.inactive != null && !this.inactive.isEmpty();
}
/**
* @param value {@link #inactive} (A flag to indicate that the member is no longer in the group, but previously may have been a member.). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value
*/
public GroupMemberComponent setInactiveElement(BooleanType value) {
this.inactive = value;
return this;
}
/**
* @return A flag to indicate that the member is no longer in the group, but previously may have been a member.
*/
public boolean getInactive() {
return this.inactive == null || this.inactive.isEmpty() ? false : this.inactive.getValue();
}
/**
* @param value A flag to indicate that the member is no longer in the group, but previously may have been a member.
*/
public GroupMemberComponent setInactive(boolean value) {
if (this.inactive == null)
this.inactive = new BooleanType();
this.inactive.setValue(value);
return this;
}
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("entity", "Reference(Patient|Practitioner|Device|Medication|Substance)", "A reference to the entity that is a member of the group. Must be consistent with Group.type.", 0, java.lang.Integer.MAX_VALUE, entity));
childrenList.add(new Property("period", "Period", "The period that the member was in the group, if known.", 0, java.lang.Integer.MAX_VALUE, period));
childrenList.add(new Property("inactive", "boolean", "A flag to indicate that the member is no longer in the group, but previously may have been a member.", 0, java.lang.Integer.MAX_VALUE, inactive));
}
public GroupMemberComponent copy() {
GroupMemberComponent dst = new GroupMemberComponent();
copyValues(dst);
dst.entity = entity == null ? null : entity.copy();
dst.period = period == null ? null : period.copy();
dst.inactive = inactive == null ? null : inactive.copy();
return dst;
}
@Override
public boolean equalsDeep(Base other) {
if (!super.equalsDeep(other))
return false;
if (!(other instanceof GroupMemberComponent))
return false;
GroupMemberComponent o = (GroupMemberComponent) other;
return compareDeep(entity, o.entity, true) && compareDeep(period, o.period, true) && compareDeep(inactive, o.inactive, true)
;
}
@Override
public boolean equalsShallow(Base other) {
if (!super.equalsShallow(other))
return false;
if (!(other instanceof GroupMemberComponent))
return false;
GroupMemberComponent o = (GroupMemberComponent) other;
return compareValues(inactive, o.inactive, true);
}
public boolean isEmpty() {
return super.isEmpty() && (entity == null || entity.isEmpty()) && (period == null || period.isEmpty())
&& (inactive == null || inactive.isEmpty());
}
}
@ -403,9 +633,9 @@ public class Group extends DomainResource {
/**
* A unique business identifier for this group.
*/
@Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1)
@Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Unique id", formalDefinition="A unique business identifier for this group." )
protected Identifier identifier;
protected List<Identifier> identifier;
/**
* Identifies the broad classification of the kind of resources the group includes.
@ -452,16 +682,11 @@ public class Group extends DomainResource {
/**
* Identifies the resource instances that are members of the group.
*/
@Child(name = "member", type = {Patient.class, Practitioner.class, Device.class, Medication.class, Substance.class}, order=7, min=0, max=Child.MAX_UNLIMITED)
@Child(name = "member", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Who or what is in group", formalDefinition="Identifies the resource instances that are members of the group." )
protected List<Reference> member;
/**
* The actual objects that are the target of the reference (Identifies the resource instances that are members of the group.)
*/
protected List<Resource> memberTarget;
protected List<GroupMemberComponent> member;
private static final long serialVersionUID = -1024529199L;
private static final long serialVersionUID = 1401345819L;
/*
* Constructor
@ -482,24 +707,40 @@ public class Group extends DomainResource {
/**
* @return {@link #identifier} (A unique business identifier for this group.)
*/
public Identifier getIdentifier() {
public List<Identifier> getIdentifier() {
if (this.identifier == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Group.identifier");
else if (Configuration.doAutoCreate())
this.identifier = new Identifier(); // cc
this.identifier = new ArrayList<Identifier>();
return this.identifier;
}
public boolean hasIdentifier() {
return this.identifier != null && !this.identifier.isEmpty();
if (this.identifier == null)
return false;
for (Identifier item : this.identifier)
if (!item.isEmpty())
return true;
return false;
}
/**
* @param value {@link #identifier} (A unique business identifier for this group.)
* @return {@link #identifier} (A unique business identifier for this group.)
*/
public Group setIdentifier(Identifier value) {
this.identifier = value;
// syntactic sugar
public Identifier addIdentifier() { //3
Identifier t = new Identifier();
if (this.identifier == null)
this.identifier = new ArrayList<Identifier>();
this.identifier.add(t);
return t;
}
// syntactic sugar
public Group addIdentifier(Identifier t) { //3
if (t == null)
return this;
if (this.identifier == null)
this.identifier = new ArrayList<Identifier>();
this.identifier.add(t);
return this;
}
@ -754,16 +995,16 @@ public class Group extends DomainResource {
/**
* @return {@link #member} (Identifies the resource instances that are members of the group.)
*/
public List<Reference> getMember() {
public List<GroupMemberComponent> getMember() {
if (this.member == null)
this.member = new ArrayList<Reference>();
this.member = new ArrayList<GroupMemberComponent>();
return this.member;
}
public boolean hasMember() {
if (this.member == null)
return false;
for (Reference item : this.member)
for (GroupMemberComponent item : this.member)
if (!item.isEmpty())
return true;
return false;
@ -773,33 +1014,24 @@ public class Group extends DomainResource {
* @return {@link #member} (Identifies the resource instances that are members of the group.)
*/
// syntactic sugar
public Reference addMember() { //3
Reference t = new Reference();
public GroupMemberComponent addMember() { //3
GroupMemberComponent t = new GroupMemberComponent();
if (this.member == null)
this.member = new ArrayList<Reference>();
this.member = new ArrayList<GroupMemberComponent>();
this.member.add(t);
return t;
}
// syntactic sugar
public Group addMember(Reference t) { //3
public Group addMember(GroupMemberComponent t) { //3
if (t == null)
return this;
if (this.member == null)
this.member = new ArrayList<Reference>();
this.member = new ArrayList<GroupMemberComponent>();
this.member.add(t);
return this;
}
/**
* @return {@link #member} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies the resource instances that are members of the group.)
*/
public List<Resource> getMemberTarget() {
if (this.memberTarget == null)
this.memberTarget = new ArrayList<Resource>();
return this.memberTarget;
}
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("identifier", "Identifier", "A unique business identifier for this group.", 0, java.lang.Integer.MAX_VALUE, identifier));
@ -809,13 +1041,17 @@ public class Group extends DomainResource {
childrenList.add(new Property("name", "string", "A label assigned to the group for human identification and communication.", 0, java.lang.Integer.MAX_VALUE, name));
childrenList.add(new Property("quantity", "unsignedInt", "A count of the number of resource instances that are part of the group.", 0, java.lang.Integer.MAX_VALUE, quantity));
childrenList.add(new Property("characteristic", "", "Identifies the traits shared by members of the group.", 0, java.lang.Integer.MAX_VALUE, characteristic));
childrenList.add(new Property("member", "Reference(Patient|Practitioner|Device|Medication|Substance)", "Identifies the resource instances that are members of the group.", 0, java.lang.Integer.MAX_VALUE, member));
childrenList.add(new Property("member", "", "Identifies the resource instances that are members of the group.", 0, java.lang.Integer.MAX_VALUE, member));
}
public Group copy() {
Group dst = new Group();
copyValues(dst);
dst.identifier = identifier == null ? null : identifier.copy();
if (identifier != null) {
dst.identifier = new ArrayList<Identifier>();
for (Identifier i : identifier)
dst.identifier.add(i.copy());
};
dst.type = type == null ? null : type.copy();
dst.actual = actual == null ? null : actual.copy();
dst.code = code == null ? null : code.copy();
@ -827,8 +1063,8 @@ public class Group extends DomainResource {
dst.characteristic.add(i.copy());
};
if (member != null) {
dst.member = new ArrayList<Reference>();
for (Reference i : member)
dst.member = new ArrayList<GroupMemberComponent>();
for (GroupMemberComponent i : member)
dst.member.add(i.copy());
};
return dst;
@ -881,7 +1117,7 @@ public class Group extends DomainResource {
public static final String SP_CHARACTERISTICVALUE = "characteristic-value";
@SearchParamDefinition(name="code", path="Group.code", description="The kind of resources contained", type="token" )
public static final String SP_CODE = "code";
@SearchParamDefinition(name="member", path="Group.member", description="Who or what is in group", type="reference" )
@SearchParamDefinition(name="member", path="Group.member.entity", description="Reference to the group member", type="reference" )
public static final String SP_MEMBER = "member";
@SearchParamDefinition(name="exclude", path="Group.characteristic.exclude", description="Group includes or excludes", type="token" )
public static final String SP_EXCLUDE = "exclude";

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;

View File

@ -29,11 +29,12 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.instance.model.Enumerations.*;
import org.hl7.fhir.instance.model.annotations.Child;
import org.hl7.fhir.instance.model.annotations.Description;
import org.hl7.fhir.instance.model.annotations.DatatypeDef;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import java.util.*;
@ -41,7 +41,7 @@ import org.hl7.fhir.instance.model.annotations.Description;
import org.hl7.fhir.instance.model.annotations.Block;
import org.hl7.fhir.instance.model.api.*;
/**
* A set of DICOM SOP Instances of a patient, selected for some application purpose, e.g., quality assurance, teaching, conference, consulting, etc. Objects selected can be from different studies, but must be of the same patient.
* A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (cine video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on.
*/
@ResourceDef(name="ImagingObjectSelection", profile="http://hl7.org/fhir/Profile/ImagingObjectSelection")
public class ImagingObjectSelection extends DomainResource {
@ -49,27 +49,39 @@ public class ImagingObjectSelection extends DomainResource {
@Block()
public static class StudyComponent extends BackboneElement implements IBaseBackboneElement {
/**
* Study instance uid of the SOP instances in the selection.
* Study instance UID of the SOP instances in the selection.
*/
@Child(name = "uid", type = {OidType.class}, order=1, min=1, max=1)
@Description(shortDefinition="Study instance uid", formalDefinition="Study instance uid of the SOP instances in the selection." )
@Description(shortDefinition="Study instance UID", formalDefinition="Study instance UID of the SOP instances in the selection." )
protected OidType uid;
/**
* WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection.
*/
@Child(name = "url", type = {UriType.class}, order=2, min=0, max=1)
@Description(shortDefinition="Retrieve URL", formalDefinition="WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection." )
@Description(shortDefinition="Retrieve study URL", formalDefinition="WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection." )
protected UriType url;
/**
* Series indetity and locating information of the DICOM SOP instances in the selection.
* Reference to the Imaging Study in FHIR form.
*/
@Child(name = "series", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Series identity of the selected instances", formalDefinition="Series indetity and locating information of the DICOM SOP instances in the selection." )
@Child(name = "imagingStudy", type = {ImagingStudy.class}, order=3, min=0, max=1)
@Description(shortDefinition="Reference to ImagingStudy", formalDefinition="Reference to the Imaging Study in FHIR form." )
protected Reference imagingStudy;
/**
* The actual object that is the target of the reference (Reference to the Imaging Study in FHIR form.)
*/
protected ImagingStudy imagingStudyTarget;
/**
* Series indentity and locating information of the DICOM SOP instances in the selection.
*/
@Child(name = "series", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED)
@Description(shortDefinition="Series identity of the selected instances", formalDefinition="Series indentity and locating information of the DICOM SOP instances in the selection." )
protected List<SeriesComponent> series;
private static final long serialVersionUID = -1632673574L;
private static final long serialVersionUID = 341246743L;
/*
* Constructor
@ -87,7 +99,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #uid} (Study instance uid of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
* @return {@link #uid} (Study instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
*/
public OidType getUidElement() {
if (this.uid == null)
@ -107,7 +119,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @param value {@link #uid} (Study instance uid of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
* @param value {@link #uid} (Study instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
*/
public StudyComponent setUidElement(OidType value) {
this.uid = value;
@ -115,14 +127,14 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return Study instance uid of the SOP instances in the selection.
* @return Study instance UID of the SOP instances in the selection.
*/
public String getUid() {
return this.uid == null ? null : this.uid.getValue();
}
/**
* @param value Study instance uid of the SOP instances in the selection.
* @param value Study instance UID of the SOP instances in the selection.
*/
public StudyComponent setUid(String value) {
if (this.uid == null)
@ -181,7 +193,51 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #series} (Series indetity and locating information of the DICOM SOP instances in the selection.)
* @return {@link #imagingStudy} (Reference to the Imaging Study in FHIR form.)
*/
public Reference getImagingStudy() {
if (this.imagingStudy == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create StudyComponent.imagingStudy");
else if (Configuration.doAutoCreate())
this.imagingStudy = new Reference(); // cc
return this.imagingStudy;
}
public boolean hasImagingStudy() {
return this.imagingStudy != null && !this.imagingStudy.isEmpty();
}
/**
* @param value {@link #imagingStudy} (Reference to the Imaging Study in FHIR form.)
*/
public StudyComponent setImagingStudy(Reference value) {
this.imagingStudy = value;
return this;
}
/**
* @return {@link #imagingStudy} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the Imaging Study in FHIR form.)
*/
public ImagingStudy getImagingStudyTarget() {
if (this.imagingStudyTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create StudyComponent.imagingStudy");
else if (Configuration.doAutoCreate())
this.imagingStudyTarget = new ImagingStudy(); // aa
return this.imagingStudyTarget;
}
/**
* @param value {@link #imagingStudy} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the Imaging Study in FHIR form.)
*/
public StudyComponent setImagingStudyTarget(ImagingStudy value) {
this.imagingStudyTarget = value;
return this;
}
/**
* @return {@link #series} (Series indentity and locating information of the DICOM SOP instances in the selection.)
*/
public List<SeriesComponent> getSeries() {
if (this.series == null)
@ -199,7 +255,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #series} (Series indetity and locating information of the DICOM SOP instances in the selection.)
* @return {@link #series} (Series indentity and locating information of the DICOM SOP instances in the selection.)
*/
// syntactic sugar
public SeriesComponent addSeries() { //3
@ -222,9 +278,10 @@ public class ImagingObjectSelection extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("uid", "oid", "Study instance uid of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, uid));
childrenList.add(new Property("uid", "oid", "Study instance UID of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, uid));
childrenList.add(new Property("url", "uri", "WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection.", 0, java.lang.Integer.MAX_VALUE, url));
childrenList.add(new Property("series", "", "Series indetity and locating information of the DICOM SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, series));
childrenList.add(new Property("imagingStudy", "Reference(ImagingStudy)", "Reference to the Imaging Study in FHIR form.", 0, java.lang.Integer.MAX_VALUE, imagingStudy));
childrenList.add(new Property("series", "", "Series indentity and locating information of the DICOM SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, series));
}
public StudyComponent copy() {
@ -232,6 +289,7 @@ public class ImagingObjectSelection extends DomainResource {
copyValues(dst);
dst.uid = uid == null ? null : uid.copy();
dst.url = url == null ? null : url.copy();
dst.imagingStudy = imagingStudy == null ? null : imagingStudy.copy();
if (series != null) {
dst.series = new ArrayList<SeriesComponent>();
for (SeriesComponent i : series)
@ -247,8 +305,8 @@ public class ImagingObjectSelection extends DomainResource {
if (!(other instanceof StudyComponent))
return false;
StudyComponent o = (StudyComponent) other;
return compareDeep(uid, o.uid, true) && compareDeep(url, o.url, true) && compareDeep(series, o.series, true)
;
return compareDeep(uid, o.uid, true) && compareDeep(url, o.url, true) && compareDeep(imagingStudy, o.imagingStudy, true)
&& compareDeep(series, o.series, true);
}
@Override
@ -262,8 +320,8 @@ public class ImagingObjectSelection extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (uid == null || uid.isEmpty()) && (url == null || url.isEmpty()) && (series == null || series.isEmpty())
;
return super.isEmpty() && (uid == null || uid.isEmpty()) && (url == null || url.isEmpty()) && (imagingStudy == null || imagingStudy.isEmpty())
&& (series == null || series.isEmpty());
}
}
@ -271,17 +329,17 @@ public class ImagingObjectSelection extends DomainResource {
@Block()
public static class SeriesComponent extends BackboneElement implements IBaseBackboneElement {
/**
* Series instance uid of the SOP instances in the selection.
* Series instance UID of the SOP instances in the selection.
*/
@Child(name = "uid", type = {OidType.class}, order=1, min=0, max=1)
@Description(shortDefinition="Series instance uid", formalDefinition="Series instance uid of the SOP instances in the selection." )
@Description(shortDefinition="Series instance UID", formalDefinition="Series instance UID of the SOP instances in the selection." )
protected OidType uid;
/**
* WADO-RS URL to retrieve the series Note that this URL retrieves all SOP instances of the series not only those in the selection.
* WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.
*/
@Child(name = "url", type = {UriType.class}, order=2, min=0, max=1)
@Description(shortDefinition="Retrieve URL", formalDefinition="WADO-RS URL to retrieve the series Note that this URL retrieves all SOP instances of the series not only those in the selection." )
@Description(shortDefinition="Retrieve series URL", formalDefinition="WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection." )
protected UriType url;
/**
@ -301,7 +359,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #uid} (Series instance uid of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
* @return {@link #uid} (Series instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
*/
public OidType getUidElement() {
if (this.uid == null)
@ -321,7 +379,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @param value {@link #uid} (Series instance uid of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
* @param value {@link #uid} (Series instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
*/
public SeriesComponent setUidElement(OidType value) {
this.uid = value;
@ -329,14 +387,14 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return Series instance uid of the SOP instances in the selection.
* @return Series instance UID of the SOP instances in the selection.
*/
public String getUid() {
return this.uid == null ? null : this.uid.getValue();
}
/**
* @param value Series instance uid of the SOP instances in the selection.
* @param value Series instance UID of the SOP instances in the selection.
*/
public SeriesComponent setUid(String value) {
if (Utilities.noString(value))
@ -350,7 +408,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #url} (WADO-RS URL to retrieve the series Note that this URL retrieves all SOP instances of the series not only those in the selection.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
* @return {@link #url} (WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
*/
public UriType getUrlElement() {
if (this.url == null)
@ -370,7 +428,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @param value {@link #url} (WADO-RS URL to retrieve the series Note that this URL retrieves all SOP instances of the series not only those in the selection.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
* @param value {@link #url} (WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
*/
public SeriesComponent setUrlElement(UriType value) {
this.url = value;
@ -378,14 +436,14 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return WADO-RS URL to retrieve the series Note that this URL retrieves all SOP instances of the series not only those in the selection.
* @return WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.
*/
public String getUrl() {
return this.url == null ? null : this.url.getValue();
}
/**
* @param value WADO-RS URL to retrieve the series Note that this URL retrieves all SOP instances of the series not only those in the selection.
* @param value WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.
*/
public SeriesComponent setUrl(String value) {
if (Utilities.noString(value))
@ -440,8 +498,8 @@ public class ImagingObjectSelection extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("uid", "oid", "Series instance uid of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, uid));
childrenList.add(new Property("url", "uri", "WADO-RS URL to retrieve the series Note that this URL retrieves all SOP instances of the series not only those in the selection.", 0, java.lang.Integer.MAX_VALUE, url));
childrenList.add(new Property("uid", "oid", "Series instance UID of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, uid));
childrenList.add(new Property("url", "uri", "WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.", 0, java.lang.Integer.MAX_VALUE, url));
childrenList.add(new Property("instance", "", "Identity and locating information of the selected DICOM SOP instances.", 0, java.lang.Integer.MAX_VALUE, instance));
}
@ -489,24 +547,24 @@ public class ImagingObjectSelection extends DomainResource {
@Block()
public static class InstanceComponent extends BackboneElement implements IBaseBackboneElement {
/**
* SOP class uid of the selected instance.
* SOP class UID of the selected instance.
*/
@Child(name = "sopClass", type = {OidType.class}, order=1, min=1, max=1)
@Description(shortDefinition="SOP class uid of instance", formalDefinition="SOP class uid of the selected instance." )
@Description(shortDefinition="SOP class UID of instance", formalDefinition="SOP class UID of the selected instance." )
protected OidType sopClass;
/**
* SOP Instance uid of the selected instance.
* SOP Instance UID of the selected instance.
*/
@Child(name = "uid", type = {OidType.class}, order=2, min=1, max=1)
@Description(shortDefinition="Uid of the selected instance", formalDefinition="SOP Instance uid of the selected instance." )
@Description(shortDefinition="Selected instance UID", formalDefinition="SOP Instance UID of the selected instance." )
protected OidType uid;
/**
* WADO-RS URL to retrieve the DICOM SOP Instance.
*/
@Child(name = "url", type = {UriType.class}, order=3, min=1, max=1)
@Description(shortDefinition="Retrieve URL", formalDefinition="WADO-RS URL to retrieve the DICOM SOP Instance." )
@Description(shortDefinition="Retrieve instance URL", formalDefinition="WADO-RS URL to retrieve the DICOM SOP Instance." )
protected UriType url;
/**
@ -536,7 +594,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #sopClass} (SOP class uid of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value
* @return {@link #sopClass} (SOP class UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value
*/
public OidType getSopClassElement() {
if (this.sopClass == null)
@ -556,7 +614,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @param value {@link #sopClass} (SOP class uid of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value
* @param value {@link #sopClass} (SOP class UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value
*/
public InstanceComponent setSopClassElement(OidType value) {
this.sopClass = value;
@ -564,14 +622,14 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return SOP class uid of the selected instance.
* @return SOP class UID of the selected instance.
*/
public String getSopClass() {
return this.sopClass == null ? null : this.sopClass.getValue();
}
/**
* @param value SOP class uid of the selected instance.
* @param value SOP class UID of the selected instance.
*/
public InstanceComponent setSopClass(String value) {
if (this.sopClass == null)
@ -581,7 +639,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #uid} (SOP Instance uid of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
* @return {@link #uid} (SOP Instance UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
*/
public OidType getUidElement() {
if (this.uid == null)
@ -601,7 +659,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @param value {@link #uid} (SOP Instance uid of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
* @param value {@link #uid} (SOP Instance UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
*/
public InstanceComponent setUidElement(OidType value) {
this.uid = value;
@ -609,14 +667,14 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return SOP Instance uid of the selected instance.
* @return SOP Instance UID of the selected instance.
*/
public String getUid() {
return this.uid == null ? null : this.uid.getValue();
}
/**
* @param value SOP Instance uid of the selected instance.
* @param value SOP Instance UID of the selected instance.
*/
public InstanceComponent setUid(String value) {
if (this.uid == null)
@ -712,8 +770,8 @@ public class ImagingObjectSelection extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("sopClass", "oid", "SOP class uid of the selected instance.", 0, java.lang.Integer.MAX_VALUE, sopClass));
childrenList.add(new Property("uid", "oid", "SOP Instance uid of the selected instance.", 0, java.lang.Integer.MAX_VALUE, uid));
childrenList.add(new Property("sopClass", "oid", "SOP class UID of the selected instance.", 0, java.lang.Integer.MAX_VALUE, sopClass));
childrenList.add(new Property("uid", "oid", "SOP Instance UID of the selected instance.", 0, java.lang.Integer.MAX_VALUE, uid));
childrenList.add(new Property("url", "uri", "WADO-RS URL to retrieve the DICOM SOP Instance.", 0, java.lang.Integer.MAX_VALUE, url));
childrenList.add(new Property("frames", "", "Identity and location information of the frames in the selected instance.", 0, java.lang.Integer.MAX_VALUE, frames));
}
@ -774,7 +832,7 @@ public class ImagingObjectSelection extends DomainResource {
* WADO-RS URL to retrieve the DICOM frames.
*/
@Child(name = "url", type = {UriType.class}, order=2, min=1, max=1)
@Description(shortDefinition="Retrieve URL", formalDefinition="WADO-RS URL to retrieve the DICOM frames." )
@Description(shortDefinition="Retrieve frame URL", formalDefinition="WADO-RS URL to retrieve the DICOM frames." )
protected UriType url;
private static final long serialVersionUID = -2068206970L;
@ -939,21 +997,21 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* Instance UID of the DICOM KOS SOP Instances represenetd in this resource.
* Instance UID of the DICOM KOS SOP Instances represented in this resource.
*/
@Child(name = "uid", type = {OidType.class}, order=0, min=1, max=1)
@Description(shortDefinition="Instance UID", formalDefinition="Instance UID of the DICOM KOS SOP Instances represenetd in this resource." )
@Description(shortDefinition="Instance UID", formalDefinition="Instance UID of the DICOM KOS SOP Instances represented in this resource." )
protected OidType uid;
/**
* A patient resource reference which is the patient subject of all DICOM SOP Instances in this key object selection.
* A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.
*/
@Child(name = "patient", type = {Patient.class}, order=1, min=1, max=1)
@Description(shortDefinition="Patient of the selected objects", formalDefinition="A patient resource reference which is the patient subject of all DICOM SOP Instances in this key object selection." )
@Description(shortDefinition="Patient of the selected objects", formalDefinition="A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection." )
protected Reference patient;
/**
* The actual object that is the target of the reference (A patient resource reference which is the patient subject of all DICOM SOP Instances in this key object selection.)
* The actual object that is the target of the reference (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.)
*/
protected Patient patientTarget;
@ -965,29 +1023,29 @@ public class ImagingObjectSelection extends DomainResource {
protected CodeableConcept title;
/**
* Text description of the DICOM SOP instances selected in the key object selection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.
* Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.
*/
@Child(name = "description", type = {StringType.class}, order=3, min=0, max=1)
@Description(shortDefinition="Description text", formalDefinition="Text description of the DICOM SOP instances selected in the key object selection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection." )
@Description(shortDefinition="Description text", formalDefinition="Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection." )
protected StringType description;
/**
* Author of key object selection. It can be a human authtor or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.
* Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.
*/
@Child(name = "author", type = {Practitioner.class, Device.class, Organization.class, Patient.class, RelatedPerson.class}, order=4, min=0, max=1)
@Description(shortDefinition="Author (human or machine)", formalDefinition="Author of key object selection. It can be a human authtor or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion." )
@Description(shortDefinition="Author (human or machine)", formalDefinition="Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion." )
protected Reference author;
/**
* The actual object that is the target of the reference (Author of key object selection. It can be a human authtor or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.)
* The actual object that is the target of the reference (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.)
*/
protected Resource authorTarget;
/**
* Date and time when the key object selection was authored. Note that this is the date and time the DICOM SOP instances in the selection were selected (selection decision making). It is different from the creation date and time of the selection resource.
* Date and time when the selection of the referenced instances were made. It is (typically) diffeent from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).
*/
@Child(name = "authoringTime", type = {DateTimeType.class}, order=5, min=0, max=1)
@Description(shortDefinition="Authoring time of the selection", formalDefinition="Date and time when the key object selection was authored. Note that this is the date and time the DICOM SOP instances in the selection were selected (selection decision making). It is different from the creation date and time of the selection resource." )
@Description(shortDefinition="Authoring time of the selection", formalDefinition="Date and time when the selection of the referenced instances were made. It is (typically) diffeent from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image)." )
protected DateTimeType authoringTime;
/**
@ -1017,7 +1075,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #uid} (Instance UID of the DICOM KOS SOP Instances represenetd in this resource.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
* @return {@link #uid} (Instance UID of the DICOM KOS SOP Instances represented in this resource.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
*/
public OidType getUidElement() {
if (this.uid == null)
@ -1037,7 +1095,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @param value {@link #uid} (Instance UID of the DICOM KOS SOP Instances represenetd in this resource.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
* @param value {@link #uid} (Instance UID of the DICOM KOS SOP Instances represented in this resource.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
*/
public ImagingObjectSelection setUidElement(OidType value) {
this.uid = value;
@ -1045,14 +1103,14 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return Instance UID of the DICOM KOS SOP Instances represenetd in this resource.
* @return Instance UID of the DICOM KOS SOP Instances represented in this resource.
*/
public String getUid() {
return this.uid == null ? null : this.uid.getValue();
}
/**
* @param value Instance UID of the DICOM KOS SOP Instances represenetd in this resource.
* @param value Instance UID of the DICOM KOS SOP Instances represented in this resource.
*/
public ImagingObjectSelection setUid(String value) {
if (this.uid == null)
@ -1062,7 +1120,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #patient} (A patient resource reference which is the patient subject of all DICOM SOP Instances in this key object selection.)
* @return {@link #patient} (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.)
*/
public Reference getPatient() {
if (this.patient == null)
@ -1078,7 +1136,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @param value {@link #patient} (A patient resource reference which is the patient subject of all DICOM SOP Instances in this key object selection.)
* @param value {@link #patient} (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.)
*/
public ImagingObjectSelection setPatient(Reference value) {
this.patient = value;
@ -1086,7 +1144,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A patient resource reference which is the patient subject of all DICOM SOP Instances in this key object selection.)
* @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.)
*/
public Patient getPatientTarget() {
if (this.patientTarget == null)
@ -1098,7 +1156,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A patient resource reference which is the patient subject of all DICOM SOP Instances in this key object selection.)
* @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.)
*/
public ImagingObjectSelection setPatientTarget(Patient value) {
this.patientTarget = value;
@ -1130,7 +1188,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #description} (Text description of the DICOM SOP instances selected in the key object selection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
* @return {@link #description} (Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
*/
public StringType getDescriptionElement() {
if (this.description == null)
@ -1150,7 +1208,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @param value {@link #description} (Text description of the DICOM SOP instances selected in the key object selection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
* @param value {@link #description} (Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
*/
public ImagingObjectSelection setDescriptionElement(StringType value) {
this.description = value;
@ -1158,14 +1216,14 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return Text description of the DICOM SOP instances selected in the key object selection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.
* @return Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.
*/
public String getDescription() {
return this.description == null ? null : this.description.getValue();
}
/**
* @param value Text description of the DICOM SOP instances selected in the key object selection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.
* @param value Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.
*/
public ImagingObjectSelection setDescription(String value) {
if (Utilities.noString(value))
@ -1179,7 +1237,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #author} (Author of key object selection. It can be a human authtor or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.)
* @return {@link #author} (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.)
*/
public Reference getAuthor() {
if (this.author == null)
@ -1195,7 +1253,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @param value {@link #author} (Author of key object selection. It can be a human authtor or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.)
* @param value {@link #author} (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.)
*/
public ImagingObjectSelection setAuthor(Reference value) {
this.author = value;
@ -1203,14 +1261,14 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Author of key object selection. It can be a human authtor or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.)
* @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.)
*/
public Resource getAuthorTarget() {
return this.authorTarget;
}
/**
* @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Author of key object selection. It can be a human authtor or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.)
* @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.)
*/
public ImagingObjectSelection setAuthorTarget(Resource value) {
this.authorTarget = value;
@ -1218,7 +1276,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return {@link #authoringTime} (Date and time when the key object selection was authored. Note that this is the date and time the DICOM SOP instances in the selection were selected (selection decision making). It is different from the creation date and time of the selection resource.). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value
* @return {@link #authoringTime} (Date and time when the selection of the referenced instances were made. It is (typically) diffeent from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value
*/
public DateTimeType getAuthoringTimeElement() {
if (this.authoringTime == null)
@ -1238,7 +1296,7 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @param value {@link #authoringTime} (Date and time when the key object selection was authored. Note that this is the date and time the DICOM SOP instances in the selection were selected (selection decision making). It is different from the creation date and time of the selection resource.). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value
* @param value {@link #authoringTime} (Date and time when the selection of the referenced instances were made. It is (typically) diffeent from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value
*/
public ImagingObjectSelection setAuthoringTimeElement(DateTimeType value) {
this.authoringTime = value;
@ -1246,14 +1304,14 @@ public class ImagingObjectSelection extends DomainResource {
}
/**
* @return Date and time when the key object selection was authored. Note that this is the date and time the DICOM SOP instances in the selection were selected (selection decision making). It is different from the creation date and time of the selection resource.
* @return Date and time when the selection of the referenced instances were made. It is (typically) diffeent from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).
*/
public Date getAuthoringTime() {
return this.authoringTime == null ? null : this.authoringTime.getValue();
}
/**
* @param value Date and time when the key object selection was authored. Note that this is the date and time the DICOM SOP instances in the selection were selected (selection decision making). It is different from the creation date and time of the selection resource.
* @param value Date and time when the selection of the referenced instances were made. It is (typically) diffeent from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).
*/
public ImagingObjectSelection setAuthoringTime(Date value) {
if (value == null)
@ -1308,12 +1366,12 @@ public class ImagingObjectSelection extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("uid", "oid", "Instance UID of the DICOM KOS SOP Instances represenetd in this resource.", 0, java.lang.Integer.MAX_VALUE, uid));
childrenList.add(new Property("patient", "Reference(Patient)", "A patient resource reference which is the patient subject of all DICOM SOP Instances in this key object selection.", 0, java.lang.Integer.MAX_VALUE, patient));
childrenList.add(new Property("uid", "oid", "Instance UID of the DICOM KOS SOP Instances represented in this resource.", 0, java.lang.Integer.MAX_VALUE, uid));
childrenList.add(new Property("patient", "Reference(Patient)", "A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.", 0, java.lang.Integer.MAX_VALUE, patient));
childrenList.add(new Property("title", "CodeableConcept", "The reason for, or significance of, the selection of objects referenced in the resource.", 0, java.lang.Integer.MAX_VALUE, title));
childrenList.add(new Property("description", "string", "Text description of the DICOM SOP instances selected in the key object selection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, description));
childrenList.add(new Property("author", "Reference(Practitioner|Device|Organization|Patient|RelatedPerson)", "Author of key object selection. It can be a human authtor or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.", 0, java.lang.Integer.MAX_VALUE, author));
childrenList.add(new Property("authoringTime", "dateTime", "Date and time when the key object selection was authored. Note that this is the date and time the DICOM SOP instances in the selection were selected (selection decision making). It is different from the creation date and time of the selection resource.", 0, java.lang.Integer.MAX_VALUE, authoringTime));
childrenList.add(new Property("description", "string", "Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, description));
childrenList.add(new Property("author", "Reference(Practitioner|Device|Organization|Patient|RelatedPerson)", "Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attached in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.", 0, java.lang.Integer.MAX_VALUE, author));
childrenList.add(new Property("authoringTime", "dateTime", "Date and time when the selection of the referenced instances were made. It is (typically) diffeent from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).", 0, java.lang.Integer.MAX_VALUE, authoringTime));
childrenList.add(new Property("study", "", "Study identity and locating information of the DICOM SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, study));
}

Some files were not shown because too many files have changed in this diff Show More