Nested and repeated extensions in custom resource types

1,006 views
Skip to first unread message

Poseidon

unread,
Aug 3, 2016, 9:45:27 AM8/3/16
to HAPI FHIR
The way how nested extensions are created is defined here: https://www.hl7.org/fhir/extensibility.html (Ctrl+F: "nested"). I am developing a fhir compliant software, that is located in the field of veterinary healthcare. When medications are administered to animals, they are not allowed to be processed in any way (milk, meat, ...) for a specific time. However, the duration of this withdrawal period varies depending on the application type, (injected beneath skin? directly in muscle? applied as a ointment?) the species the medication is applied to and the specific product.

For example if Medication A is applied to cattle through subcutan injection, the animal may not be slaughtered for two weeks, but it's milk may be sold again already after a single week of waiting.

I came up wit this "extension model":

{
 
"extension" : [{
   
"url" : "http://ahr.copa.inso.tuwien.ac.at/StructureDefinition/Medication#withdrawalPeroid",
   
"extension" : [
     
{
     
"url" : "amount",
     
"valueDecimal" : "0.5"
     
},
     
{
     
"url" : "unit",
     
"valueCodeableConcept" : {
           
"coding" : {
             
"system" : "http://www.basg.gv.at/eservices/veterinaer-antibiotika-mengenstromanalyse/datenbereitstellung#timeUnits",
             
"code" : "100000110784"
           
}
       
}
     
},
     
{
     
"url" : "species",
     
"valueCodeableConcept" : {
           
"coding" : {
             
"system": "http://ahr.copa.inso.tuwien.ac.at/ValueSet/Species",
             
"code": "btaurus"
           
}
       
}
     
},
     
{
     
"url" : "applicationType",
     
"valueCodeableConcept" : {
           
"coding" : {
             
"system" : "http://www.basg.gv.at/eservices/veterinaer-antibiotika-mengenstromanalyse/datenbereitstellung#applicationType",
             
"code" : "intramuskuläre Anwendung"
           
}
       
}
     
},
     
{
     
"url" : "productType",
     
"valueCodeableConcept" : {
           
"coding" : {
             
"system" : "http://www.basg.gv.at/eservices/veterinaer-antibiotika-mengenstromanalyse/datenbereitstellung#productType",
             
"code" : "Essbare Gewebe"
           
}
       
}
     
}
   
]
 
}]
}

But this also only captures the withdrawal peroid for a specific application type and regarding a specific product of a specific species. So this entry has to be repeated multiple times for a single medication.

So, is it possible to add nested extensions to custom resource types? How can these entries be repeated (as in a array of these extensions)? Or do I have to implement some type of workaround?

Poseidon

unread,
Aug 9, 2016, 11:01:11 AM8/9/16
to HAPI FHIR
So, ... not possible right now?

James Agnew

unread,
Aug 9, 2016, 11:12:56 AM8/9/16
to Poseidon, HAPI FHIR
Hi Poseidon,

I'm sorry, I'm not quite clear what you're asking.

If you're looking to add extensions to resource, yes that's absolutely possible with HAPI. There is some documentation about this here: http://hapifhir.io/doc_extensions.html

If you're looking to create nested extensions, there is an example under "sub extensions".

If I'm missing the point of the question though, I apologize- happy to fill in anything that isn't clear in from the docs.

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/d7de707b-8cf0-4c4e-8e70-5590e168b042%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Poseidon

unread,
Aug 10, 2016, 9:35:33 AM8/10/16
to HAPI FHIR, milch...@gmail.com
Hi James,

I'm sorry if my initial post was confusing. Yes, I'm trying to add sub-extensions to my resource. I've seen that it can be done using undeclared extensions, but can this also be achieved through the creation of HAPI "Custom Resource Types"? 

My second problem is that I have to create "multiple entries" of the extension structure illustrated above for a single resource instance (like an array of these extension structures). This SO post (http://stackoverflow.com/questions/35090473/fhir-extension-which-is-an-array-of-objects) states, that this can be realized in FHIR by simply "repeating" the extension. Can this be done in HAPI FHIR?

Kind regards and thank you for your quick response,
Poseidon
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.

To post to this group, send email to hapi...@googlegroups.com.

robert.k...@gmail.com

unread,
Aug 15, 2016, 10:16:05 AM8/15/16
to HAPI FHIR
Same problem, hardcoding of undeclared extensions is inadequate. It can be solved by creating custom extension class, which certainly looks ugly, because it creates unnecessary decoupling and what if I need three levels of extensions? Create another class?

 

James Agnew

unread,
Aug 21, 2016, 1:27:20 PM8/21/16
to Poseidon, HAPI FHIR
Hi Poseidon,

It is indeed possible to create custom resource types for composite extensions. I've committed an example of how to do this here: 

If you want to have a repeating extension like in that StackOverflow question, you would just make the type of your field be List<CustomType> instead of just Type.

Cheers,
James


To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.

To post to this group, send email to hapi...@googlegroups.com.

Poseidon

unread,
Sep 6, 2016, 9:15:16 AM9/6/16
to HAPI FHIR, milch...@gmail.com
I tried to apply your example to our project, this is the class I came up with:

package at.ac.tuwien.inso.copa.ahr.backend.model.clinical;


import ca.uhn.fhir.model.api.annotation.*;
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu2.resource.Medication;
import ca.uhn.fhir.model.primitive.DecimalDt;
import ca.uhn.fhir.util.ElementUtil;
import org.hl7.fhir.instance.model.BackboneElement;


import java.util.ArrayList;
import java.util.List;


/**
 * Created by Felix on 20.03.2016.
 */

@ResourceDef(name="Medication")
public class MedicationProfile extends Medication {




   
@Child(name = "withdrawalData")
   
@Extension(url="http://ahr.copa.inso.tuwien.ac.at/StructureDefinition/Medication#withdrawalPeriod", definedLocally = false, isModifier = false)
   
protected List<WithdrawalPeriod> withdrawalPeriods;


   
public List<WithdrawalPeriod> getWithdrawalPeriods() {
       
if (withdrawalPeriods == null) {
            withdrawalPeriods
= new ArrayList<>();
       
}
       
return withdrawalPeriods;
   
}


   
public MedicationProfile setWithdrawalPeriods(List<WithdrawalPeriod> withdrawalPeriods) {
       
this.withdrawalPeriods = withdrawalPeriods;
       
return this;
   
}


   
public WithdrawalPeriod addWithdrawalPeriod() {
       
WithdrawalPeriod newWp = new WithdrawalPeriod();
        getWithdrawalPeriods
().add(newWp);
       
return newWp;
   
}


   
public MedicationProfile addWithdrawalPeriod(WithdrawalPeriod withdrawalPeriod) {
       
if (withdrawalPeriod == null) {
           
throw new NullPointerException("withdrawalPeriod must not be null");
       
}
        getWithdrawalPeriods
().add(withdrawalPeriod);
       
return this;
   
}


   
public WithdrawalPeriod addWithdrawalPeriodsFirstRep() {
       
if (getWithdrawalPeriods().isEmpty()) {
           
return addWithdrawalPeriod();
       
}
       
return getWithdrawalPeriods().get(0);
   
}


   
@Override
   
public boolean isEmpty() {
       
return super.isEmpty() && ElementUtil.isEmpty(withdrawalPeriods);
   
}


   
@Block
   
public static class WithdrawalPeriod extends BackboneElement {


       
private static final long serialVersionUID = 4522090347756045145L;


       
@Override
       
public boolean isEmpty() {
           
return super.isEmpty() && ElementUtil.isEmpty(amount, unit, applicationType, productType);
       
}


       
@Override
       
public WithdrawalPeriod copy() {
           
WithdrawalPeriod copy = new WithdrawalPeriod();
            copy
.amount = this.getAmount();
            copy
.unit = this.getUnit();
            copy
.applicationType = this.getApplicationType();
            copy
.productType = this.getProductType();
           
return copy;
       
}


       
@Child(name="amount", min=0, max=1)
       
@Extension(url="http://ahr.copa.inso.tuwien.ac.at/StructureDefinition/Medication#withdrawalPeriod-amount", definedLocally=false, isModifier=false)
       
@Description(shortDefinition="Depicts the amount of the withdrawal period caused by administration of this medication in respect to application and product type")
       
private DecimalDt amount;


       
public DecimalDt getAmount() {
           
if (amount == null) {
                amount
= new DecimalDt();
           
}
           
return amount;
       
}


       
public DecimalDt setAmount(DecimalDt amount) {
           
this.amount = amount;
           
return amount;
       
}


       
public DecimalDt setAmount(double amount) {
           
this.amount = new DecimalDt(amount);
           
return this.amount;
       
}


       
@Child(name="unit", min=0, max=1)
       
@Extension(url="http://ahr.copa.inso.tuwien.ac.at/StructureDefinition/Medication#withdrawalPeriod-unit", definedLocally=false, isModifier=false)
       
@Description(shortDefinition="Depicts the unit of the withdrawal period caused by administration of this medication")
       
private CodeableConceptDt unit;




       
public CodeableConceptDt getUnit() {
           
if (this.unit == null) {
               
return new CodeableConceptDt();
           
}
           
return unit;
       
}


       
public void setUnit(CodeableConceptDt unit) {
           
this.unit = unit;
       
}


       
@Child(name="applicationType", min=0, max=1)
       
@Extension(url="http://ahr.copa.inso.tuwien.ac.at/StructureDefinition/Medication#withdrawalPeriod-applicationType", definedLocally=false, isModifier=false)
       
@Description(shortDefinition="Depicts the way this medication was applied")
       
private CodeableConceptDt applicationType;




       
public CodeableConceptDt getApplicationType() {
           
if (this.applicationType == null) {
               
return new CodeableConceptDt();
           
}
           
return applicationType;
       
}


       
public void setApplicationType(CodeableConceptDt applicationType) {
           
this.applicationType = applicationType;
       
}


       
@Child(name="productType", min=0, max=1)
       
@Extension(url="http://ahr.copa.inso.tuwien.ac.at/StructureDefinition/Medication#withdrawalPeriod-productType", definedLocally=false, isModifier=false)
       
@Description(shortDefinition="Depicts the affected type of product")
       
private CodeableConceptDt productType;




       
public CodeableConceptDt getProductType() {
           
if (this.productType == null) {
               
return new CodeableConceptDt();
           
}
           
return productType;
       
}


       
public void setProductType(CodeableConceptDt applicationType) {
           
this.productType = applicationType;
       
}


       
//TODO: LEGAL STATE


   
}


}



When starting up the server, I get an 500 internal server error and no conformance statement is generated. This is the exception stack trace:

2016-09-06 15:07:42.206 [http-apr-8080-exec-10] ERROR c.uhn.fhir.rest.server.RestfulServer [RestfulServer.java:821] An error occurred while loading request handlers! ca.uhn.fhir.context.ConfigurationException: Unknown profileOf value: class org.hl7.fhir.instance.model.StringType in type org.hl7.fhir.instance.model.IdType - Valid types: [class ca.uhn.fhir.model.primitive.UnsignedIntDt, class at.ac.tuwien.inso.copa.ahr.backend.model.identification.RelatedPersonProfile, class ca.uhn.fhir.model.dstu2.composite.RatioDt, class ca.uhn.fhir.model.primitive.InstantDt, class ca.uhn.fhir.model.primitive.IntegerDt, class ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt, class ca.uhn.fhir.model.primitive.MarkdownDt, class ca.uhn.fhir.model.primitive.StringDt, class ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt, class ca.uhn.fhir.model.dstu2.composite.SignatureDt, class ca.uhn.fhir.model.dstu2.composite.IdentifierDt, class ca.uhn.fhir.model.dstu2.composite.QuantityDt, class at.ac.tuwien.inso.copa.ahr.backend.model.identification.OrganizationProfile, class ca.uhn.fhir.model.dstu2.composite.AgeDt, class ca.uhn.fhir.model.dstu2.composite.AddressDt, class ca.uhn.fhir.model.dstu2.composite.RangeDt, class ca.uhn.fhir.model.dstu2.composite.TimingDt, class ca.uhn.fhir.model.dstu2.composite.ContactPointDt, class ca.uhn.fhir.model.dstu2.composite.NarrativeDt, class ca.uhn.fhir.model.primitive.Base64BinaryDt, class ca.uhn.fhir.model.dstu2.composite.DistanceDt, class ca.uhn.fhir.model.primitive.PositiveIntDt, class ca.uhn.fhir.model.primitive.BoundCodeDt, class ca.uhn.fhir.model.dstu2.composite.MetaDt, class at.ac.tuwien.inso.copa.ahr.backend.model.identification.PractitionerProfile, class ca.uhn.fhir.model.primitive.DecimalDt, class ca.uhn.fhir.model.dstu2.composite.PeriodDt, class ca.uhn.fhir.model.primitive.DateDt, class ca.uhn.fhir.model.primitive.IdrefDt, class org.hl7.fhir.instance.model.IdType, class ca.uhn.fhir.model.dstu2.composite.MoneyDt, class ca.uhn.fhir.model.dstu2.composite.AttachmentDt, class ca.uhn.fhir.model.primitive.CodeDt, class ca.uhn.fhir.model.dstu2.composite.DurationDt, class ca.uhn.fhir.model.primitive.OidDt, class ca.uhn.fhir.model.dstu2.composite.HumanNameDt, class at.ac.tuwien.inso.copa.ahr.backend.model.clinical.ObservationProfile, class ca.uhn.fhir.model.api.ExtensionDt, class ca.uhn.fhir.model.primitive.XhtmlDt, class ca.uhn.fhir.model.primitive.IdDt, class ca.uhn.fhir.model.dstu2.composite.CodingDt, class ca.uhn.fhir.model.primitive.DateTimeDt, class at.ac.tuwien.inso.copa.ahr.backend.model.clinical.ConditionProfile, class at.ac.tuwien.inso.copa.ahr.backend.model.identification.PatientProfile, class ca.uhn.fhir.model.primitive.TimeDt, class ca.uhn.fhir.model.dstu2.composite.CountDt, class ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt, class ca.uhn.fhir.model.dstu2.composite.AnnotationDt, class ca.uhn.fhir.model.dstu2.composite.SampledDataDt, class ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt, class at.ac.tuwien.inso.copa.ahr.backend.model.identification.PersonProfile, class ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt, class ca.uhn.fhir.model.primitive.UriDt, class ca.uhn.fhir.model.primitive.BooleanDt] at ca.uhn.fhir.context.RuntimePrimitiveDatatypeDefinition.sealAndInitialize(RuntimePrimitiveDatatypeDefinition.java:131) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.ModelScanner.init(ModelScanner.java:198) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.ModelScanner.<init>(ModelScanner.java:96) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.FhirContext.scanResourceTypes(FhirContext.java:585) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.FhirContext.scanDatatype(FhirContext.java:562) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.FhirContext.getElementDefinition(FhirContext.java:225) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.BaseRuntimeChildDatatypeDefinition.sealAndInitialize(BaseRuntimeChildDatatypeDefinition.java:101) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition.sealAndInitialize(BaseRuntimeElementCompositeDefinition.java:456) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.ModelScanner.init(ModelScanner.java:198) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.ModelScanner.<init>(ModelScanner.java:96) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.FhirContext.scanResourceTypes(FhirContext.java:585) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.FhirContext.scanDatatype(FhirContext.java:562) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.FhirContext.getElementDefinition(FhirContext.java:225) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.RuntimeChildDeclaredExtensionDefinition.sealAndInitialize(RuntimeChildDeclaredExtensionDefinition.java:167) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.BaseRuntimeElementDefinition.sealAndInitialize(BaseRuntimeElementDefinition.java:166) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition.sealAndInitialize(BaseRuntimeElementCompositeDefinition.java:453) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.RuntimeResourceDefinition.sealAndInitialize(RuntimeResourceDefinition.java:169) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.ModelScanner.init(ModelScanner.java:198) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.ModelScanner.<init>(ModelScanner.java:96) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.FhirContext.scanResourceTypes(FhirContext.java:585) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.FhirContext.scanResourceType(FhirContext.java:569) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.context.FhirContext.getResourceDefinition(FhirContext.java:294) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.rest.server.RestfulServer.registerProviders(RestfulServer.java:1075) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.rest.server.RestfulServer.init(RestfulServer.java:781) ~[hapi-fhir-base-1.6.jar:na] at javax.servlet.GenericServlet.init(GenericServlet.java:158) [servlet-api.jar:4.0.EDR-b01] at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1194) [catalina.jar:9.0.0.M3] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1110) [catalina.jar:9.0.0.M3] at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:790) [catalina.jar:9.0.0.M3] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133) [catalina.jar:9.0.0.M3] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:105) [catalina.jar:9.0.0.M3] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:618) [catalina.jar:9.0.0.M3] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:9.0.0.M3] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:9.0.0.M3] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) [catalina.jar:9.0.0.M3] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:9.0.0.M3] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:9.0.0.M3] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1078) [tomcat-coyote.jar:9.0.0.M3] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:9.0.0.M3] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:760) [tomcat-coyote.jar:9.0.0.M3] at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2323) [tomcat-coyote.jar:9.0.0.M3] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_66] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_66] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.0.M3] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_66] 2016-09-06 15:07:42.211 [http-apr-8080-exec-8] WARN ca.uhn.fhir.to.BaseController [BaseController.java:396] Failed to load conformance statement ca.uhn.fhir.rest.server.exceptions.InternalErrorException: HTTP 500 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_66] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_66] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_66] at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_66] at ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.newInstance(BaseServerResponseException.java:272) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.rest.client.BaseClient.invokeClient(BaseClient.java:306) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.rest.client.BaseClient.invokeClient(BaseClient.java:201) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.rest.client.GenericClient.conformance(GenericClient.java:191) ~[hapi-fhir-base-1.6.jar:na] at ca.uhn.fhir.to.BaseController.loadAndAddConfDstu2(BaseController.java:394) [classes/:na] at ca.uhn.fhir.to.BaseController.loadAndAddConf(BaseController.java:321) [classes/:na] at ca.uhn.fhir.to.BaseController.addCommonParams(BaseController.java:97) [classes/:na] at ca.uhn.fhir.to.Controller.actionHome(Controller.java:229) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_66] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_66] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_66] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_66] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) [spring-web-4.3.0.RELEASE.jar:4.3.0.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) [spring-web-4.3.0.RELEASE.jar:4.3.0.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114) [spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) [spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) [spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) [spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) [spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) [spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) [servlet-api.jar:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:232) [catalina.jar:9.0.0.M3] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [catalina.jar:9.0.0.M3] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-websocket.jar:9.0.0.M3] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.0.M3] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [catalina.jar:9.0.0.M3] at org.ebaysf.web.cors.CORSFilter.handleNonCORS(CORSFilter.java:437) [cors-filter-1.0.1.jar:na] at org.ebaysf.web.cors.CORSFilter.doFilter(CORSFilter.java:172) [cors-filter-1.0.1.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.0.M3] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [catalina.jar:9.0.0.M3] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [catalina.jar:9.0.0.M3] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:105) [catalina.jar:9.0.0.M3] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:618) [catalina.jar:9.0.0.M3] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:9.0.0.M3] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:9.0.0.M3] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) [catalina.jar:9.0.0.M3] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:9.0.0.M3] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:9.0.0.M3] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1078) [tomcat-coyote.jar:9.0.0.M3] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:9.0.0.M3] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:760) [tomcat-coyote.jar:9.0.0.M3] at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2323) [tomcat-coyote.jar:9.0.0.M3] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_66] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_66] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.0.M3] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_66]

I am using HAPI FHIR 1.6 with the Test Server GUI and DSTU2. 

Kevin Mayfield

unread,
Sep 6, 2016, 9:28:08 AM9/6/16
to Poseidon, HAPI FHIR
Seems like you're mixing the org.hl7.fhir.instance.model with ca.uhn.fhir.model.dstu2

I had that problem when I moved to 1.7, I kept accidentally mixing models. Should you be using these on 1.6 ca.uhn.fhir.model.dstu2.* classes and org.hl7.fhir.instance.model.* on 1.7+?





--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.

Poseidon

unread,
Sep 6, 2016, 9:49:58 AM9/6/16
to HAPI FHIR, milch...@gmail.com
You're right, but the thing is there is no such thing as a BackboneElement in DSTU2 classes.

According to IntelliJ my options are: org.hl7.fhir.instance.model and org.hl7.fhir.dstu3.model.

Poseidon

unread,
Sep 6, 2016, 10:13:33 AM9/6/16
to HAPI FHIR, milch...@gmail.com
Updated to HAPI FHIR 2.0. Now it seems to be working.

Kevin Mayfield

unread,
Sep 6, 2016, 10:50:51 AM9/6/16
to Poseidon, HAPI FHIR
I should have mentioned that;s what I did..

On 6 September 2016 at 15:13, Poseidon <milch...@gmail.com> wrote:
Updated to HAPI FHIR 2.0. Now it seems to be working.

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages