|
|
|
@ -59,15 +59,43 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
@Autowired
|
|
|
|
|
private ModelConfig myModelConfig;
|
|
|
|
|
private Set<String> myIgnoredForSearchDatatypes;
|
|
|
|
|
private BaseRuntimeChildDefinition quantityValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition quantitySystemChild;
|
|
|
|
|
private BaseRuntimeChildDefinition quantityCodeChild;
|
|
|
|
|
private BaseRuntimeChildDefinition moneyValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition moneyCurrencyChild;
|
|
|
|
|
private BaseRuntimeElementCompositeDefinition<?> locationPositionDefinition;
|
|
|
|
|
private BaseRuntimeChildDefinition codeSystemUrlValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition rangeLowValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition rangeHighValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myQuantityValueValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myQuantitySystemValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myQuantityCodeValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myMoneyValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myMoneyCurrencyChild;
|
|
|
|
|
private BaseRuntimeElementCompositeDefinition<?> myLocationPositionDefinition;
|
|
|
|
|
private BaseRuntimeChildDefinition myCodeSystemUrlValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myRangeLowValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myRangeHighValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myAddressLineValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myAddressCityValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myAddressStateValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myAddressCountryValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myAddressPostalCodeValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myCapabilityStatementRestSecurityServiceValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myPeriodStartValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myPeriodEndValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myTimingEventValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myTimingRepeatValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myTimingRepeatBoundsValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myDurationSystemValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myDurationCodeValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myDurationValueValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myHumanNameFamilyValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myHumanNameGivenValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myContactPointValueValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myIdentifierSystemValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myIdentifierValueValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myIdentifierTypeValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myIdentifierTypeTextValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myCodeableConceptCodingValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myCodeableConceptTextValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myCodingSystemValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myCodingCodeValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myCodingDisplayValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myContactPointSystemValueChild;
|
|
|
|
|
private BaseRuntimeChildDefinition myPatientCommunicationLanguageValueChild;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Constructor
|
|
|
|
@ -92,14 +120,14 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
String useSystem;
|
|
|
|
|
if (getContext().getVersion().getVersion().equals(FhirVersionEnum.DSTU2)) {
|
|
|
|
|
if (resourceTypeName.equals("ValueSet")) {
|
|
|
|
|
ca.uhn.fhir.model.dstu2.resource.ValueSet dstu2ValueSet = (ca.uhn.fhir.model.dstu2.resource.ValueSet)theResource;
|
|
|
|
|
ca.uhn.fhir.model.dstu2.resource.ValueSet dstu2ValueSet = (ca.uhn.fhir.model.dstu2.resource.ValueSet) theResource;
|
|
|
|
|
useSystem = dstu2ValueSet.getCodeSystem().getSystem();
|
|
|
|
|
} else {
|
|
|
|
|
useSystem = null;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (resourceTypeName.equals("CodeSystem")) {
|
|
|
|
|
useSystem = extractValueAsString(codeSystemUrlValueChild, theResource);
|
|
|
|
|
useSystem = extractValueAsString(myCodeSystemUrlValueChild, theResource);
|
|
|
|
|
} else {
|
|
|
|
|
useSystem = null;
|
|
|
|
|
}
|
|
|
|
@ -186,7 +214,7 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
return extractSearchParams(theResource, extractor, RestSearchParameterTypeEnum.TOKEN);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void addUnexpectedDatatypeWarning(SearchParamSet<? extends BaseResourceIndexedSearchParam> params, RuntimeSearchParam searchParam, IBase value) {
|
|
|
|
|
private void addUnexpectedDatatypeWarning(SearchParamSet<? extends BaseResourceIndexedSearchParam> params, RuntimeSearchParam searchParam, IBase value) {
|
|
|
|
|
params.addWarning("Search param " + searchParam.getName() + " is of unexpected datatype: " + value.getClass());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -280,7 +308,7 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
public SearchParamSet<ResourceIndexedSearchParamQuantity> extractSearchParamQuantity(IBaseResource theResource) {
|
|
|
|
|
|
|
|
|
|
IExtractor<ResourceIndexedSearchParamQuantity> extractor = (params, searchParam, value, path) -> {
|
|
|
|
|
if (value.getClass().equals(locationPositionDefinition.getImplementingClass())) {
|
|
|
|
|
if (value.getClass().equals(myLocationPositionDefinition.getImplementingClass())) {
|
|
|
|
|
ourLog.warn("Position search not currently supported, not indexing location");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -407,7 +435,7 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
return myModelConfig;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Collection<RuntimeSearchParam> getSearchParams(IBaseResource theResource) {
|
|
|
|
|
private Collection<RuntimeSearchParam> getSearchParams(IBaseResource theResource) {
|
|
|
|
|
RuntimeResourceDefinition def = getContext().getResourceDefinition(theResource);
|
|
|
|
|
Collection<RuntimeSearchParam> retVal = mySearchParamRegistry.getActiveSearchParams(def.getName()).values();
|
|
|
|
|
List<RuntimeSearchParam> defaultList = Collections.emptyList();
|
|
|
|
@ -415,50 +443,14 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
return retVal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostConstruct
|
|
|
|
|
public void start() {
|
|
|
|
|
myIgnoredForSearchDatatypes = new HashSet<>();
|
|
|
|
|
addIgnoredType(getContext(), "Annotation", myIgnoredForSearchDatatypes);
|
|
|
|
|
addIgnoredType(getContext(), "Attachment", myIgnoredForSearchDatatypes);
|
|
|
|
|
addIgnoredType(getContext(), "Count", myIgnoredForSearchDatatypes);
|
|
|
|
|
addIgnoredType(getContext(), "Distance", myIgnoredForSearchDatatypes);
|
|
|
|
|
addIgnoredType(getContext(), "Ratio", myIgnoredForSearchDatatypes);
|
|
|
|
|
addIgnoredType(getContext(), "SampledData", myIgnoredForSearchDatatypes);
|
|
|
|
|
addIgnoredType(getContext(), "Signature", myIgnoredForSearchDatatypes);
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> quantityDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Quantity");
|
|
|
|
|
quantityValueChild = quantityDefinition.getChildByName("value");
|
|
|
|
|
quantitySystemChild = quantityDefinition.getChildByName("system");
|
|
|
|
|
quantityCodeChild = quantityDefinition.getChildByName("code");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> moneyDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Money");
|
|
|
|
|
moneyValueChild = moneyDefinition.getChildByName("value");
|
|
|
|
|
moneyCurrencyChild = moneyDefinition.getChildByName("currency");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> locationDefinition = getContext().getResourceDefinition("Location");
|
|
|
|
|
BaseRuntimeChildDefinition locationPositionValueChild = locationDefinition.getChildByName("position");
|
|
|
|
|
locationPositionDefinition = (BaseRuntimeElementCompositeDefinition<?>) locationPositionValueChild.getChildByName("position");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> codeSystemDefinition;
|
|
|
|
|
if (getContext().getVersion().getVersion().isEqualOrNewerThan(FhirVersionEnum.DSTU3)) {
|
|
|
|
|
codeSystemDefinition = getContext().getResourceDefinition("CodeSystem");
|
|
|
|
|
assert codeSystemDefinition != null;
|
|
|
|
|
codeSystemUrlValueChild = codeSystemDefinition.getChildByName("url");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> rangeDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Range");
|
|
|
|
|
rangeLowValueChild = rangeDefinition.getChildByName("low");
|
|
|
|
|
rangeHighValueChild = rangeDefinition.getChildByName("high");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addQuantity_Quantity(String theResourceType, Set<ResourceIndexedSearchParamQuantity> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
|
|
|
|
|
Optional<IPrimitiveType<BigDecimal>> valueField = quantityValueChild.getAccessor().getFirstValueOrNull(theValue);
|
|
|
|
|
Optional<IPrimitiveType<BigDecimal>> valueField = myQuantityValueValueChild.getAccessor().getFirstValueOrNull(theValue);
|
|
|
|
|
if (valueField.isPresent() && valueField.get().getValue() != null) {
|
|
|
|
|
BigDecimal nextValueValue = valueField.get().getValue();
|
|
|
|
|
String system = extractValueAsString(quantitySystemChild, theValue);
|
|
|
|
|
String code = extractValueAsString(quantityCodeChild, theValue);
|
|
|
|
|
String system = extractValueAsString(myQuantitySystemValueChild, theValue);
|
|
|
|
|
String code = extractValueAsString(myQuantityCodeValueChild, theValue);
|
|
|
|
|
|
|
|
|
|
ResourceIndexedSearchParamQuantity nextEntity = new ResourceIndexedSearchParamQuantity(theResourceType, theSearchParam.getName(), nextValueValue, system, code);
|
|
|
|
|
theParams.add(nextEntity);
|
|
|
|
@ -468,12 +460,12 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
|
|
|
|
|
private void addQuantity_Money(String theResourceType, Set<ResourceIndexedSearchParamQuantity> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
|
|
|
|
|
Optional<IPrimitiveType<BigDecimal>> valueField = moneyValueChild.getAccessor().getFirstValueOrNull(theValue);
|
|
|
|
|
Optional<IPrimitiveType<BigDecimal>> valueField = myMoneyValueChild.getAccessor().getFirstValueOrNull(theValue);
|
|
|
|
|
if (valueField.isPresent() && valueField.get().getValue() != null) {
|
|
|
|
|
BigDecimal nextValueValue = valueField.get().getValue();
|
|
|
|
|
|
|
|
|
|
String nextValueString = "urn:iso:std:iso:4217";
|
|
|
|
|
String nextValueCode = extractValueAsString(moneyCurrencyChild, theValue);
|
|
|
|
|
String nextValueCode = extractValueAsString(myMoneyCurrencyChild, theValue);
|
|
|
|
|
String searchParamName = theSearchParam.getName();
|
|
|
|
|
ResourceIndexedSearchParamQuantity nextEntity = new ResourceIndexedSearchParamQuantity(theResourceType, searchParamName, nextValueValue, nextValueString, nextValueCode);
|
|
|
|
|
theParams.add(nextEntity);
|
|
|
|
@ -483,98 +475,64 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
|
|
|
|
|
private void addQuantity_Range(String theResourceType, Set<ResourceIndexedSearchParamQuantity> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
|
|
|
|
|
Optional<IBase> low = rangeLowValueChild.getAccessor().getFirstValueOrNull(theValue);
|
|
|
|
|
Optional<IBase> low = myRangeLowValueChild.getAccessor().getFirstValueOrNull(theValue);
|
|
|
|
|
low.ifPresent(theIBase -> addQuantity_Quantity(theResourceType, theParams, theSearchParam, theIBase));
|
|
|
|
|
|
|
|
|
|
Optional<IBase> high = rangeHighValueChild.getAccessor().getFirstValueOrNull(theValue);
|
|
|
|
|
Optional<IBase> high = myRangeHighValueChild.getAccessor().getFirstValueOrNull(theValue);
|
|
|
|
|
high.ifPresent(theIBase -> addQuantity_Quantity(theResourceType, theParams, theSearchParam, theIBase));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addToken_Identifier(String theResourceType, Set<BaseResourceIndexedSearchParam> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> identifierDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Identifier");
|
|
|
|
|
BaseRuntimeChildDefinition identifierSystemValueChild = identifierDefinition.getChildByName("system");
|
|
|
|
|
BaseRuntimeChildDefinition identifierValueValueChild = identifierDefinition.getChildByName("value");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeChildDefinition identifierTypeValueChild = identifierDefinition.getChildByName("type");
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> identifierTypeDefinition = (BaseRuntimeElementCompositeDefinition<?>) identifierTypeValueChild.getChildByName("type");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeChildDefinition identifierTypeTextValueChild = identifierTypeDefinition.getChildByName("text");
|
|
|
|
|
|
|
|
|
|
String system = extractValueAsString(identifierSystemValueChild, theValue);
|
|
|
|
|
String value = extractValueAsString(identifierValueValueChild, theValue);
|
|
|
|
|
String system = extractValueAsString(myIdentifierSystemValueChild, theValue);
|
|
|
|
|
String value = extractValueAsString(myIdentifierValueValueChild, theValue);
|
|
|
|
|
if (isNotBlank(value)) {
|
|
|
|
|
createTokenIndexIfNotBlank(theResourceType, theParams, theSearchParam, system, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Optional<IBase> type = identifierTypeValueChild.getAccessor().getFirstValueOrNull(theValue);
|
|
|
|
|
Optional<IBase> type = myIdentifierTypeValueChild.getAccessor().getFirstValueOrNull(theValue);
|
|
|
|
|
if (type.isPresent()) {
|
|
|
|
|
String text = extractValueAsString(identifierTypeTextValueChild, type.get());
|
|
|
|
|
String text = extractValueAsString(myIdentifierTypeTextValueChild, type.get());
|
|
|
|
|
createStringIndexIfNotBlank(theResourceType, theParams, theSearchParam, text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addToken_CodeableConcept(String theResourceType, Set<BaseResourceIndexedSearchParam> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> codeableConceptDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("CodeableConcept");
|
|
|
|
|
BaseRuntimeChildDefinition codeableConceptCodingValueChild = codeableConceptDefinition.getChildByName("coding");
|
|
|
|
|
BaseRuntimeChildDefinition codeableConceptTextValueChild = codeableConceptDefinition.getChildByName("text");
|
|
|
|
|
|
|
|
|
|
List<IBase> codings = codeableConceptCodingValueChild.getAccessor().getValues(theValue);
|
|
|
|
|
List<IBase> codings = myCodeableConceptCodingValueChild.getAccessor().getValues(theValue);
|
|
|
|
|
for (IBase nextCoding : codings) {
|
|
|
|
|
addToken_Coding(theResourceType, theParams, theSearchParam, nextCoding);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String text = extractValueAsString(codeableConceptTextValueChild, theValue);
|
|
|
|
|
String text = extractValueAsString(myCodeableConceptTextValueChild, theValue);
|
|
|
|
|
if (isNotBlank(text)) {
|
|
|
|
|
createStringIndexIfNotBlank(theResourceType, theParams, theSearchParam, text);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addToken_Coding(String theResourceType, Set<BaseResourceIndexedSearchParam> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> codingDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Coding");
|
|
|
|
|
BaseRuntimeChildDefinition codingSystemValueChild = codingDefinition.getChildByName("system");
|
|
|
|
|
BaseRuntimeChildDefinition codingCodeValueChild = codingDefinition.getChildByName("code");
|
|
|
|
|
BaseRuntimeChildDefinition codingDisplayValueChild = codingDefinition.getChildByName("display");
|
|
|
|
|
|
|
|
|
|
String system = extractValueAsString(codingSystemValueChild, theValue);
|
|
|
|
|
String code = extractValueAsString(codingCodeValueChild, theValue);
|
|
|
|
|
String system = extractValueAsString(myCodingSystemValueChild, theValue);
|
|
|
|
|
String code = extractValueAsString(myCodingCodeValueChild, theValue);
|
|
|
|
|
createTokenIndexIfNotBlank(theResourceType, theParams, theSearchParam, system, code);
|
|
|
|
|
|
|
|
|
|
String text = extractValueAsString(codingDisplayValueChild, theValue);
|
|
|
|
|
String text = extractValueAsString(myCodingDisplayValueChild, theValue);
|
|
|
|
|
createStringIndexIfNotBlank(theResourceType, theParams, theSearchParam, text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addToken_ContactPoint(String theResourceType, Set<BaseResourceIndexedSearchParam> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> contactPointDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("ContactPoint");
|
|
|
|
|
BaseRuntimeChildDefinition contactPointSystemValueChild = contactPointDefinition.getChildByName("system");
|
|
|
|
|
BaseRuntimeChildDefinition contactPointValueValueChild = contactPointDefinition.getChildByName("value");
|
|
|
|
|
|
|
|
|
|
String system = extractValueAsString(contactPointSystemValueChild, theValue);
|
|
|
|
|
String value = extractValueAsString(contactPointValueValueChild, theValue);
|
|
|
|
|
String system = extractValueAsString(myContactPointSystemValueChild, theValue);
|
|
|
|
|
String value = extractValueAsString(myContactPointValueValueChild, theValue);
|
|
|
|
|
createTokenIndexIfNotBlank(theResourceType, theParams, theSearchParam, system, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addToken_PatientCommunication(String theResourceType, Set<BaseResourceIndexedSearchParam> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> patientDefinition = getContext().getResourceDefinition("Patient");
|
|
|
|
|
BaseRuntimeChildDefinition patientCommunicationValueChild = patientDefinition.getChildByName("communication");
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> patientCommunicationDefinition = (BaseRuntimeElementCompositeDefinition<?>) patientCommunicationValueChild.getChildByName("communication");
|
|
|
|
|
BaseRuntimeChildDefinition patientCommunicationLanguageValueChild = patientCommunicationDefinition.getChildByName("language");
|
|
|
|
|
|
|
|
|
|
List<IBase> values = patientCommunicationLanguageValueChild.getAccessor().getValues(theValue);
|
|
|
|
|
List<IBase> values = myPatientCommunicationLanguageValueChild.getAccessor().getValues(theValue);
|
|
|
|
|
for (IBase next : values) {
|
|
|
|
|
addToken_CodeableConcept(theResourceType, theParams, theSearchParam, next);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addToken_CapabilityStatementRestSecurity(String theResourceType, Set<BaseResourceIndexedSearchParam> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> capabilityStatementDefinition = getContext().getResourceDefinition("CapabilityStatement");
|
|
|
|
|
BaseRuntimeChildDefinition capabilityStatementRestChild = capabilityStatementDefinition.getChildByName("rest");
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> capabilityStatementRestDefinition = (BaseRuntimeElementCompositeDefinition<?>) capabilityStatementRestChild.getChildByName("rest");
|
|
|
|
|
BaseRuntimeChildDefinition capabilityStatementRestSecurityValueChild = capabilityStatementRestDefinition.getChildByName("security");
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> capabilityStatementRestSecurityDefinition = (BaseRuntimeElementCompositeDefinition<?>) capabilityStatementRestSecurityValueChild.getChildByName("security");
|
|
|
|
|
BaseRuntimeChildDefinition capabilityStatementRestSecurityServiceValueChild = capabilityStatementRestSecurityDefinition.getChildByName("service");
|
|
|
|
|
|
|
|
|
|
List<IBase> values = capabilityStatementRestSecurityServiceValueChild.getAccessor().getValues(theValue);
|
|
|
|
|
List<IBase> values = myCapabilityStatementRestSecurityServiceValueChild.getAccessor().getValues(theValue);
|
|
|
|
|
for (IBase nextValue : values) {
|
|
|
|
|
addToken_CodeableConcept(theResourceType, theParams, theSearchParam, nextValue);
|
|
|
|
|
}
|
|
|
|
@ -582,13 +540,9 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addDate_Period(String theResourceType, Set<ResourceIndexedSearchParamDate> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> periodDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Period");
|
|
|
|
|
BaseRuntimeChildDefinition periodStartValueChild = periodDefinition.getChildByName("start");
|
|
|
|
|
BaseRuntimeChildDefinition periodEndValueChild = periodDefinition.getChildByName("end");
|
|
|
|
|
|
|
|
|
|
Date start = extractValueAsDate(periodStartValueChild, theValue);
|
|
|
|
|
String startAsString = extractValueAsString(periodStartValueChild, theValue);
|
|
|
|
|
Date end = extractValueAsDate(periodEndValueChild, theValue);
|
|
|
|
|
Date start = extractValueAsDate(myPeriodStartValueChild, theValue);
|
|
|
|
|
String startAsString = extractValueAsString(myPeriodStartValueChild, theValue);
|
|
|
|
|
Date end = extractValueAsDate(myPeriodEndValueChild, theValue);
|
|
|
|
|
|
|
|
|
|
if (start != null || end != null) {
|
|
|
|
|
ResourceIndexedSearchParamDate nextEntity = new ResourceIndexedSearchParamDate(theResourceType, theSearchParam.getName(), start, end, startAsString);
|
|
|
|
@ -597,13 +551,7 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addDate_Timing(String theResourceType, Set<ResourceIndexedSearchParamDate> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> timingDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Timing");
|
|
|
|
|
BaseRuntimeChildDefinition timingEventValueChild = timingDefinition.getChildByName("event");
|
|
|
|
|
BaseRuntimeChildDefinition timingRepeatValueChild = timingDefinition.getChildByName("repeat");
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> timingRepeatDefinition = (BaseRuntimeElementCompositeDefinition<?>) timingRepeatValueChild.getChildByName("repeat");
|
|
|
|
|
BaseRuntimeChildDefinition timingRepeatBoundsValueChild = timingRepeatDefinition.getChildByName("bounds[x]");
|
|
|
|
|
|
|
|
|
|
List<IPrimitiveType<Date>> values = extractValuesAsFhirDates(timingEventValueChild, theValue);
|
|
|
|
|
List<IPrimitiveType<Date>> values = extractValuesAsFhirDates(myTimingEventValueChild, theValue);
|
|
|
|
|
|
|
|
|
|
TreeSet<Date> dates = new TreeSet<>();
|
|
|
|
|
String firstValue = null;
|
|
|
|
@ -616,21 +564,16 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Optional<IBase> repeat = timingRepeatValueChild.getAccessor().getFirstValueOrNull(theValue);
|
|
|
|
|
Optional<IBase> repeat = myTimingRepeatValueChild.getAccessor().getFirstValueOrNull(theValue);
|
|
|
|
|
if (repeat.isPresent()) {
|
|
|
|
|
Optional<IBase> bounds = timingRepeatBoundsValueChild.getAccessor().getFirstValueOrNull(repeat.get());
|
|
|
|
|
Optional<IBase> bounds = myTimingRepeatBoundsValueChild.getAccessor().getFirstValueOrNull(repeat.get());
|
|
|
|
|
if (bounds.isPresent()) {
|
|
|
|
|
String boundsType = toRootTypeName(bounds.get());
|
|
|
|
|
switch (boundsType) {
|
|
|
|
|
case "Period":
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> periodDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Period");
|
|
|
|
|
BaseRuntimeChildDefinition periodStartValueChild = periodDefinition.getChildByName("start");
|
|
|
|
|
BaseRuntimeChildDefinition periodEndValueChild = periodDefinition.getChildByName("end");
|
|
|
|
|
Date start = extractValueAsDate(periodStartValueChild, bounds.get());
|
|
|
|
|
Date end = extractValueAsDate(periodEndValueChild, bounds.get());
|
|
|
|
|
if ("Period".equals(boundsType)) {
|
|
|
|
|
Date start = extractValueAsDate(myPeriodStartValueChild, bounds.get());
|
|
|
|
|
Date end = extractValueAsDate(myPeriodEndValueChild, bounds.get());
|
|
|
|
|
dates.add(start);
|
|
|
|
|
dates.add(end);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -642,14 +585,9 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addNumber_Duration(String theResourceType, Set<ResourceIndexedSearchParamNumber> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> durationDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Duration");
|
|
|
|
|
BaseRuntimeChildDefinition durationSystemValueChild = durationDefinition.getChildByName("system");
|
|
|
|
|
BaseRuntimeChildDefinition durationCodeValueChild = durationDefinition.getChildByName("code");
|
|
|
|
|
BaseRuntimeChildDefinition durationValueValueChild = durationDefinition.getChildByName("value");
|
|
|
|
|
|
|
|
|
|
String system = extractValueAsString(durationSystemValueChild, theValue);
|
|
|
|
|
String code = extractValueAsString(durationCodeValueChild, theValue);
|
|
|
|
|
BigDecimal value = extractValueAsBigDecimal(durationValueValueChild, theValue);
|
|
|
|
|
String system = extractValueAsString(myDurationSystemValueChild, theValue);
|
|
|
|
|
String code = extractValueAsString(myDurationCodeValueChild, theValue);
|
|
|
|
|
BigDecimal value = extractValueAsBigDecimal(myDurationValueValueChild, theValue);
|
|
|
|
|
if (value != null) {
|
|
|
|
|
value = normalizeQuantityContainingTimeUnitsIntoDaysForNumberParam(system, code, value);
|
|
|
|
|
ResourceIndexedSearchParamNumber nextEntity = new ResourceIndexedSearchParamNumber(theResourceType, theSearchParam.getName(), value);
|
|
|
|
@ -658,15 +596,10 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addNumber_Quantity(String theResourceType, Set<ResourceIndexedSearchParamNumber> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> quantityDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Duration");
|
|
|
|
|
BaseRuntimeChildDefinition quantityValueValueChild = quantityDefinition.getChildByName("value");
|
|
|
|
|
BaseRuntimeChildDefinition quantitySystemChild = quantityDefinition.getChildByName("system");
|
|
|
|
|
BaseRuntimeChildDefinition quantityCodeChild = quantityDefinition.getChildByName("code");
|
|
|
|
|
|
|
|
|
|
BigDecimal value = extractValueAsBigDecimal(quantityValueValueChild, theValue);
|
|
|
|
|
BigDecimal value = extractValueAsBigDecimal(myQuantityValueValueChild, theValue);
|
|
|
|
|
if (value != null) {
|
|
|
|
|
String system = extractValueAsString(quantitySystemChild, theValue);
|
|
|
|
|
String code = extractValueAsString(quantityCodeChild, theValue);
|
|
|
|
|
String system = extractValueAsString(myQuantitySystemValueChild, theValue);
|
|
|
|
|
String code = extractValueAsString(myQuantityCodeValueChild, theValue);
|
|
|
|
|
value = normalizeQuantityContainingTimeUnitsIntoDaysForNumberParam(system, code, value);
|
|
|
|
|
ResourceIndexedSearchParamNumber nextEntity = new ResourceIndexedSearchParamNumber(theResourceType, theSearchParam.getName(), value);
|
|
|
|
|
theParams.add(nextEntity);
|
|
|
|
@ -696,16 +629,12 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addString_HumanName(String theResourceType, Set<ResourceIndexedSearchParamString> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> humanNameDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("HumanName");
|
|
|
|
|
BaseRuntimeChildDefinition humanNameFamilyValueChild = humanNameDefinition.getChildByName("family");
|
|
|
|
|
BaseRuntimeChildDefinition humanNameGivenValueChild = humanNameDefinition.getChildByName("given");
|
|
|
|
|
|
|
|
|
|
List<String> families = extractValuesAsStrings(humanNameFamilyValueChild, theValue);
|
|
|
|
|
List<String> families = extractValuesAsStrings(myHumanNameFamilyValueChild, theValue);
|
|
|
|
|
for (String next : families) {
|
|
|
|
|
createStringIndexIfNotBlank(theResourceType, theParams, theSearchParam, next);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<String> givens = extractValuesAsStrings(humanNameGivenValueChild, theValue);
|
|
|
|
|
List<String> givens = extractValuesAsStrings(myHumanNameGivenValueChild, theValue);
|
|
|
|
|
for (String next : givens) {
|
|
|
|
|
createStringIndexIfNotBlank(theResourceType, theParams, theSearchParam, next);
|
|
|
|
|
}
|
|
|
|
@ -713,61 +642,48 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addString_Quantity(String theResourceType, Set<ResourceIndexedSearchParamString> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> quantityDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Quantity");
|
|
|
|
|
BaseRuntimeChildDefinition quantityValueChild = quantityDefinition.getChildByName("value");
|
|
|
|
|
|
|
|
|
|
BigDecimal value = extractValueAsBigDecimal(quantityValueChild, theValue);
|
|
|
|
|
BigDecimal value = extractValueAsBigDecimal(myQuantityValueValueChild, theValue);
|
|
|
|
|
if (value != null) {
|
|
|
|
|
createStringIndexIfNotBlank(theResourceType, theParams, theSearchParam, value.toPlainString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addString_Range(String theResourceType, Set<ResourceIndexedSearchParamString> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> rangeDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Range");
|
|
|
|
|
BaseRuntimeChildDefinition rangeLowValueChild = rangeDefinition.getChildByName("low");
|
|
|
|
|
|
|
|
|
|
BigDecimal value = extractValueAsBigDecimal(rangeLowValueChild, theValue);
|
|
|
|
|
BigDecimal value = extractValueAsBigDecimal(myRangeLowValueChild, theValue);
|
|
|
|
|
if (value != null) {
|
|
|
|
|
createStringIndexIfNotBlank(theResourceType, theParams, theSearchParam, value.toPlainString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addString_ContactPoint(String theResourceType, Set<ResourceIndexedSearchParamString> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> contactPointDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("ContactPoint");
|
|
|
|
|
BaseRuntimeChildDefinition contactPointValueValueChild = contactPointDefinition.getChildByName("value");
|
|
|
|
|
|
|
|
|
|
String value = extractValueAsString(contactPointValueValueChild, theValue);
|
|
|
|
|
String value = extractValueAsString(myContactPointValueValueChild, theValue);
|
|
|
|
|
if (isNotBlank(value)) {
|
|
|
|
|
createStringIndexIfNotBlank(theResourceType, theParams, theSearchParam, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addString_Address(String theResourceType, Set<ResourceIndexedSearchParamString> theParams, RuntimeSearchParam theSearchParam, IBase theValue) {
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> addressDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Address");
|
|
|
|
|
BaseRuntimeChildDefinition addressLineValueChild = addressDefinition.getChildByName("line");
|
|
|
|
|
BaseRuntimeChildDefinition addressCityValueChild = addressDefinition.getChildByName("city");
|
|
|
|
|
BaseRuntimeChildDefinition addressStateValueChild = addressDefinition.getChildByName("state");
|
|
|
|
|
BaseRuntimeChildDefinition addressCountryValueChild = addressDefinition.getChildByName("country");
|
|
|
|
|
BaseRuntimeChildDefinition addressPostalCodeValueChild = addressDefinition.getChildByName("postalCode");
|
|
|
|
|
|
|
|
|
|
List<String> allNames = new ArrayList<>(extractValuesAsStrings(addressLineValueChild, theValue));
|
|
|
|
|
List<String> allNames = new ArrayList<>(extractValuesAsStrings(myAddressLineValueChild, theValue));
|
|
|
|
|
|
|
|
|
|
String city = extractValueAsString(addressCityValueChild, theValue);
|
|
|
|
|
String city = extractValueAsString(myAddressCityValueChild, theValue);
|
|
|
|
|
if (isNotBlank(city)) {
|
|
|
|
|
allNames.add(city);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String state = extractValueAsString(addressStateValueChild, theValue);
|
|
|
|
|
String state = extractValueAsString(myAddressStateValueChild, theValue);
|
|
|
|
|
if (isNotBlank(state)) {
|
|
|
|
|
allNames.add(state);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String country = extractValueAsString(addressCountryValueChild, theValue);
|
|
|
|
|
String country = extractValueAsString(myAddressCountryValueChild, theValue);
|
|
|
|
|
if (isNotBlank(country)) {
|
|
|
|
|
allNames.add(country);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String postalCode = extractValueAsString(addressPostalCodeValueChild, theValue);
|
|
|
|
|
String postalCode = extractValueAsString(myAddressPostalCodeValueChild, theValue);
|
|
|
|
|
if (isNotBlank(postalCode)) {
|
|
|
|
|
allNames.add(postalCode);
|
|
|
|
|
}
|
|
|
|
@ -895,6 +811,107 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
return theValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostConstruct
|
|
|
|
|
public void start() {
|
|
|
|
|
myIgnoredForSearchDatatypes = new HashSet<>();
|
|
|
|
|
addIgnoredType(getContext(), "Annotation", myIgnoredForSearchDatatypes);
|
|
|
|
|
addIgnoredType(getContext(), "Attachment", myIgnoredForSearchDatatypes);
|
|
|
|
|
addIgnoredType(getContext(), "Count", myIgnoredForSearchDatatypes);
|
|
|
|
|
addIgnoredType(getContext(), "Distance", myIgnoredForSearchDatatypes);
|
|
|
|
|
addIgnoredType(getContext(), "Ratio", myIgnoredForSearchDatatypes);
|
|
|
|
|
addIgnoredType(getContext(), "SampledData", myIgnoredForSearchDatatypes);
|
|
|
|
|
addIgnoredType(getContext(), "Signature", myIgnoredForSearchDatatypes);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* This is building up an internal map of all the various field accessors we'll need in order to work
|
|
|
|
|
* with the model. This is kind of ugly, but we want to be as efficient as possible since
|
|
|
|
|
* search param extraction happens a whole heck of a lot at runtime..
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> quantityDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Quantity");
|
|
|
|
|
myQuantityValueValueChild = quantityDefinition.getChildByName("value");
|
|
|
|
|
myQuantitySystemValueChild = quantityDefinition.getChildByName("system");
|
|
|
|
|
myQuantityCodeValueChild = quantityDefinition.getChildByName("code");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> moneyDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Money");
|
|
|
|
|
myMoneyValueChild = moneyDefinition.getChildByName("value");
|
|
|
|
|
myMoneyCurrencyChild = moneyDefinition.getChildByName("currency");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> locationDefinition = getContext().getResourceDefinition("Location");
|
|
|
|
|
BaseRuntimeChildDefinition locationPositionValueChild = locationDefinition.getChildByName("position");
|
|
|
|
|
myLocationPositionDefinition = (BaseRuntimeElementCompositeDefinition<?>) locationPositionValueChild.getChildByName("position");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> codeSystemDefinition;
|
|
|
|
|
if (getContext().getVersion().getVersion().isEqualOrNewerThan(FhirVersionEnum.DSTU3)) {
|
|
|
|
|
codeSystemDefinition = getContext().getResourceDefinition("CodeSystem");
|
|
|
|
|
assert codeSystemDefinition != null;
|
|
|
|
|
myCodeSystemUrlValueChild = codeSystemDefinition.getChildByName("url");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> rangeDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Range");
|
|
|
|
|
myRangeLowValueChild = rangeDefinition.getChildByName("low");
|
|
|
|
|
myRangeHighValueChild = rangeDefinition.getChildByName("high");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> addressDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Address");
|
|
|
|
|
myAddressLineValueChild = addressDefinition.getChildByName("line");
|
|
|
|
|
myAddressCityValueChild = addressDefinition.getChildByName("city");
|
|
|
|
|
myAddressStateValueChild = addressDefinition.getChildByName("state");
|
|
|
|
|
myAddressCountryValueChild = addressDefinition.getChildByName("country");
|
|
|
|
|
myAddressPostalCodeValueChild = addressDefinition.getChildByName("postalCode");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> capabilityStatementDefinition = getContext().getResourceDefinition("CapabilityStatement");
|
|
|
|
|
BaseRuntimeChildDefinition capabilityStatementRestChild = capabilityStatementDefinition.getChildByName("rest");
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> capabilityStatementRestDefinition = (BaseRuntimeElementCompositeDefinition<?>) capabilityStatementRestChild.getChildByName("rest");
|
|
|
|
|
BaseRuntimeChildDefinition capabilityStatementRestSecurityValueChild = capabilityStatementRestDefinition.getChildByName("security");
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> capabilityStatementRestSecurityDefinition = (BaseRuntimeElementCompositeDefinition<?>) capabilityStatementRestSecurityValueChild.getChildByName("security");
|
|
|
|
|
myCapabilityStatementRestSecurityServiceValueChild = capabilityStatementRestSecurityDefinition.getChildByName("service");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> periodDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Period");
|
|
|
|
|
myPeriodStartValueChild = periodDefinition.getChildByName("start");
|
|
|
|
|
myPeriodEndValueChild = periodDefinition.getChildByName("end");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> timingDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Timing");
|
|
|
|
|
myTimingEventValueChild = timingDefinition.getChildByName("event");
|
|
|
|
|
myTimingRepeatValueChild = timingDefinition.getChildByName("repeat");
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> timingRepeatDefinition = (BaseRuntimeElementCompositeDefinition<?>) myTimingRepeatValueChild.getChildByName("repeat");
|
|
|
|
|
myTimingRepeatBoundsValueChild = timingRepeatDefinition.getChildByName("bounds[x]");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> durationDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Duration");
|
|
|
|
|
myDurationSystemValueChild = durationDefinition.getChildByName("system");
|
|
|
|
|
myDurationCodeValueChild = durationDefinition.getChildByName("code");
|
|
|
|
|
myDurationValueValueChild = durationDefinition.getChildByName("value");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> humanNameDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("HumanName");
|
|
|
|
|
myHumanNameFamilyValueChild = humanNameDefinition.getChildByName("family");
|
|
|
|
|
myHumanNameGivenValueChild = humanNameDefinition.getChildByName("given");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> contactPointDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("ContactPoint");
|
|
|
|
|
myContactPointValueValueChild = contactPointDefinition.getChildByName("value");
|
|
|
|
|
myContactPointSystemValueChild = contactPointDefinition.getChildByName("system");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> identifierDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Identifier");
|
|
|
|
|
myIdentifierSystemValueChild = identifierDefinition.getChildByName("system");
|
|
|
|
|
myIdentifierValueValueChild = identifierDefinition.getChildByName("value");
|
|
|
|
|
myIdentifierTypeValueChild = identifierDefinition.getChildByName("type");
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> identifierTypeDefinition = (BaseRuntimeElementCompositeDefinition<?>) myIdentifierTypeValueChild.getChildByName("type");
|
|
|
|
|
myIdentifierTypeTextValueChild = identifierTypeDefinition.getChildByName("text");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> codeableConceptDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("CodeableConcept");
|
|
|
|
|
myCodeableConceptCodingValueChild = codeableConceptDefinition.getChildByName("coding");
|
|
|
|
|
myCodeableConceptTextValueChild = codeableConceptDefinition.getChildByName("text");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> codingDefinition = (BaseRuntimeElementCompositeDefinition<?>) getContext().getElementDefinition("Coding");
|
|
|
|
|
myCodingSystemValueChild = codingDefinition.getChildByName("system");
|
|
|
|
|
myCodingCodeValueChild = codingDefinition.getChildByName("code");
|
|
|
|
|
myCodingDisplayValueChild = codingDefinition.getChildByName("display");
|
|
|
|
|
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> patientDefinition = getContext().getResourceDefinition("Patient");
|
|
|
|
|
BaseRuntimeChildDefinition patientCommunicationValueChild = patientDefinition.getChildByName("communication");
|
|
|
|
|
BaseRuntimeElementCompositeDefinition<?> patientCommunicationDefinition = (BaseRuntimeElementCompositeDefinition<?>) patientCommunicationValueChild.getChildByName("communication");
|
|
|
|
|
myPatientCommunicationLanguageValueChild = patientCommunicationDefinition.getChildByName("language");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@FunctionalInterface
|
|
|
|
|
public interface IValueExtractor {
|
|
|
|
|
|
|
|
|
@ -966,5 +983,4 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|