Hi, I am developing a scenario where I have a plain server acting as a gateway, and "n" jpa server, acting as fhir repositories.
I need to validate resources on the basis of custom profiles, and I would prefer to validate it on the plain server, through an instance of the PrePopulatedValidationSupport class.
However, once the validation on the plain server has been passed, the jpa server does not persist the resource, because it differs from the basic profile, and it is not aware of the StructureDefinition corresponding to the profile.
For example, in my custom profile, the MedicationRequest resource has a reference to a SupplyRequest in the "basedOn" field.
The MedicationRequest base resource only allows a reference to CarePlan, MedicationRequest, ServiceRequest, ImmunizationRecommendation in the "basedOn" field. For this reason the jpa server does not persist the resource.
My question is: is it possible to completely disable resource validation on the jpa server, so that it accepts unknown profiles?
Otherwise I must necessarily relegate the validation to the jpa server, through an instance of a class that extends RepositoryValidatingInterceptor.
Thanks in advance
Andrea