public LiquidEngine(IWorkerContext context, IEvaluationContext hostServices) { super(); this.externalHostServices = hostServices; engine = new FHIRPathEngine(context); engine.setHostServices(this); }
public StructureMapUtilities(IWorkerContext worker, ITransformerServices services) { super(); this.worker = worker; this.services = services; fpe = new FHIRPathEngine(worker); fpe.setHostServices(new FFHIRPathHostServices()); }
public StructureMapUtilities(IWorkerContext worker) { super(); this.worker = worker; fpe = new FHIRPathEngine(worker); fpe.setHostServices(new FFHIRPathHostServices()); }
public StructureMapUtilities(IWorkerContext worker, ITransformerServices services, ProfileKnowledgeProvider pkp) { super(); this.worker = worker; this.services = services; this.pkp = pkp; fpe = new FHIRPathEngine(worker); fpe.setHostServices(new FFHIRPathHostServices()); }
public InstanceValidator(IWorkerContext theContext, IEvaluationContext hostServices) { super(); this.context = theContext; this.externalHostServices = hostServices; fpe = new FHIRPathEngine(context); fpe.setHostServices(new ValidatorHostServices()); source = Source.InstanceValidator; }
private List<Resource> filterResources(Argument fhirpath, List<Resource> list) throws EGraphQLException, FHIRException { List<Resource> result = new ArrayList<Resource>(); if (list.size() > 0) { if ((fhirpath == null)) for (Resource v : list) result.add(v); else { FHIRPathEngine fpe = new FHIRPathEngine(context); ExpressionNode node = fpe.parse(getSingleValue(fhirpath)); for (Resource v : list) if (fpe.evaluateToBoolean(null, v, v, node)) result.add(v); } } return result; }
public FluentPathR4(FhirContext theCtx) { if (!(theCtx.getValidationSupport() instanceof IValidationSupport)) { throw new IllegalStateException("Validation support module configured on context appears to be for the wrong FHIR version- Does not extend " + IValidationSupport.class.getName()); } IValidationSupport validationSupport = (IValidationSupport) theCtx.getValidationSupport(); myEngine = new FHIRPathEngine(new HapiWorkerContext(theCtx, validationSupport)); }
private List<Resource> filterResources(Argument fhirpath, Bundle bnd) throws EGraphQLException, FHIRException { List<Resource> result = new ArrayList<Resource>(); if (bnd.getEntry().size() > 0) { if ((fhirpath == null)) for (BundleEntryComponent be : bnd.getEntry()) result.add(be.getResource()); else { FHIRPathEngine fpe = new FHIRPathEngine(context); ExpressionNode node = fpe.parse(getSingleValue(fhirpath)); for (BundleEntryComponent be : bnd.getEntry()) if (fpe.evaluateToBoolean(null, be.getResource(), be.getResource(), node)) result.add(be.getResource()); } } return result; }
protected List<Object> extractValues(String thePaths, IBaseResource theResource) { IWorkerContext worker = new org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext(getContext(), myValidationSupport); FHIRPathEngine fp = new FHIRPathEngine(worker); fp.setHostServices(new SearchParamExtractorR4HostServices());
FHIRPathEngine fhirPathEngine = new FHIRPathEngine(new HapiWorkerContext(theContext, VALIDATION_SUPPORT)); try { fhirPathEngine.parse(theExpression);
public void execute() throws EGraphEngine, EGraphQLException, FHIRException { if (graphQL == null) throw new EGraphEngine("Unable to process graphql - graphql document missing"); fpe = new FHIRPathEngine(this.context); magicExpression = new ExpressionNode(0); output = new ObjectValue(); Operation op = null; // todo: initial conditions if (!Utilities.noString(graphQL.getOperationName())) { op = graphQL.getDocument().operation(graphQL.getOperationName()); if (op == null) throw new EGraphEngine("Unable to find operation \""+graphQL.getOperationName()+"\""); } else if ((graphQL.getDocument().getOperations().size() == 1)) op = graphQL.getDocument().getOperations().get(0); else throw new EGraphQLException("No operation name provided, so expected to find a single operation"); if (op.getOperationType() == OperationType.qglotMutation) throw new EGraphQLException("Mutation operations are not supported (yet)"); checkNoDirectives(op.getDirectives()); processVariables(op); if (focus == null) processSearch(output, op.getSelectionSet(), false, ""); else processObject(focus, focus, output, op.getSelectionSet(), false, ""); }
public LiquidEngine(IWorkerContext context, IEvaluationContext hostServices) { super(); this.externalHostServices = hostServices; engine = new FHIRPathEngine(context); engine.setHostServices(this); }
if (rule(errors, IssueType.BUSINESSRULE, profile.getId()+"::"+ed.getPath()+"::"+inv.getKey(), inv.hasExpression(), "The invariant has no FHIR Path expression ("+inv.getXpath()+")")) { try { new FHIRPathEngine(context).check(null, profile.getType(), ed.getPath(), inv.getExpression()); // , inv.hasXpath() && inv.getXpath().startsWith("@value") } catch (Exception e) {
public InstanceValidator(IWorkerContext theContext, IEvaluationContext hostServices) { super(); this.context = theContext; this.externalHostServices = hostServices; fpe = new FHIRPathEngine(context); fpe.setHostServices(new ValidatorHostServices()); source = Source.InstanceValidator; }
public StructureMapUtilities(IWorkerContext worker, ITransformerServices services, ProfileKnowledgeProvider pkp) { super(); this.worker = worker; this.services = services; this.pkp = pkp; fpe = new FHIRPathEngine(worker); fpe.setHostServices(new FFHIRPathHostServices()); }
public StructureMapUtilities(IWorkerContext worker) { super(); this.worker = worker; fpe = new FHIRPathEngine(worker); fpe.setHostServices(new FFHIRPathHostServices()); }
public StructureMapUtilities(IWorkerContext worker, ITransformerServices services) { super(); this.worker = worker; this.services = services; fpe = new FHIRPathEngine(worker); fpe.setHostServices(new FFHIRPathHostServices()); }
private List<Resource> filterResources(Argument fhirpath, List<Resource> list) throws EGraphQLException, FHIRException { List<Resource> result = new ArrayList<Resource>(); if (list.size() > 0) { if ((fhirpath == null)) for (Resource v : list) result.add(v); else { FHIRPathEngine fpe = new FHIRPathEngine(context); ExpressionNode node = fpe.parse(getSingleValue(fhirpath)); for (Resource v : list) if (fpe.evaluateToBoolean(null, v, v, node)) result.add(v); } } return result; }
public FluentPathR4(FhirContext theCtx) { if (!(theCtx.getValidationSupport() instanceof IValidationSupport)) { throw new IllegalStateException("Validation support module configured on context appears to be for the wrong FHIR version- Does not extend " + IValidationSupport.class.getName()); } IValidationSupport validationSupport = (IValidationSupport) theCtx.getValidationSupport(); myEngine = new FHIRPathEngine(new HapiWorkerContext(theCtx, validationSupport)); }
private List<Resource> filterResources(Argument fhirpath, Bundle bnd) throws EGraphQLException, FHIRException { List<Resource> result = new ArrayList<Resource>(); if (bnd.getEntry().size() > 0) { if ((fhirpath == null)) for (BundleEntryComponent be : bnd.getEntry()) result.add(be.getResource()); else { FHIRPathEngine fpe = new FHIRPathEngine(context); ExpressionNode node = fpe.parse(getSingleValue(fhirpath)); for (BundleEntryComponent be : bnd.getEntry()) if (fpe.evaluateToBoolean(null, be.getResource(), be.getResource(), node)) result.add(be.getResource()); } } return result; }