private boolean targetTypeOk(List<Argument> arguments, Resource dest) throws EGraphQLException { List<String> list = new ArrayList<String>(); for (Argument arg : arguments) { if ((arg.getName().equals("type"))) { List<Value> vl = resolveValues(arg); for (Value v : vl) list.add(v.toString()); } } if (list.size() == 0) return true; else return list.indexOf(dest.fhirType()) > -1; }
public void dropResource(Resource r) throws FHIRException { dropResource(r.fhirType(), r.getId()); }
params.add(arg); arg.setName(getSingleValue(parg)); arg.addValue(new StringValue(source.fhirType()+"/"+source.getId())); services.listResources(appInfo, field.getName().substring(0, field.getName().length() - 4), params, list); arg = null;
private void processReverseReferenceSearch(Resource source, Field field, ObjectValue target, boolean inheritedList, String suffix) throws EGraphQLException, FHIRException { if (services == null) throw new EGraphQLException("Resource Referencing services not provided"); List<Argument> params = new ArrayList<Argument>(); Argument parg = null; for (Argument a : field.getArguments()) if (!(a.getName().equals("_reference"))) params.add(a); else if ((parg == null)) parg = a; else throw new EGraphQLException("Duplicate parameter _reference"); if (parg == null) throw new EGraphQLException("Missing parameter _reference"); Argument arg = new Argument(); params.add(arg); arg.setName(getSingleValue(parg)); arg.addValue(new StringValue(source.fhirType()+"/"+source.getId())); Bundle bnd = services.search(appInfo, field.getName().substring(0, field.getName().length()-10), params); Base bndWrapper = new SearchWrapper(field.getName(), bnd); arg = target.addField(field.getAlias()+suffix, listStatus(field, false)); ObjectValue obj = new ObjectValue(); arg.addValue(obj); processObject(null, bndWrapper, obj, field.getSelectionSet(), inheritedList, suffix); }
private boolean targetTypeOk(List<Argument> arguments, Resource dest) throws EGraphQLException { List<String> list = new ArrayList<String>(); for (Argument arg : arguments) { if ((arg.getName().equals("type"))) { List<Value> vl = resolveValues(arg); for (Value v : vl) list.add(v.toString()); } } if (list.size() == 0) return true; else return list.indexOf(dest.fhirType()) > -1; }
throw new FHIRException("Unknown resource "+src.fhirType());
public void dropResource(Resource r) throws FHIRException { dropResource(r.fhirType(), r.getId()); }
params.add(arg); arg.setName(getSingleValue(parg)); arg.addValue(new StringValue(source.fhirType()+"/"+source.getId())); services.listResources(appInfo, field.getName().substring(0, field.getName().length() - 4), params, list); arg = null;
private void processReverseReferenceSearch(Resource source, Field field, ObjectValue target, boolean inheritedList, String suffix) throws EGraphQLException, FHIRException { if (services == null) throw new EGraphQLException("Resource Referencing services not provided"); List<Argument> params = new ArrayList<Argument>(); Argument parg = null; for (Argument a : field.getArguments()) if (!(a.getName().equals("_reference"))) params.add(a); else if ((parg == null)) parg = a; else throw new EGraphQLException("Duplicate parameter _reference"); if (parg == null) throw new EGraphQLException("Missing parameter _reference"); Argument arg = new Argument(); params.add(arg); arg.setName(getSingleValue(parg)); arg.addValue(new StringValue(source.fhirType()+"/"+source.getId())); Bundle bnd = services.search(appInfo, field.getName().substring(0, field.getName().length()-10), params); Base bndWrapper = new SearchWrapper(field.getName(), bnd); arg = target.addField(field.getAlias()+suffix, listStatus(field, false)); ObjectValue obj = new ObjectValue(); arg.addValue(obj); processObject(null, bndWrapper, obj, field.getSelectionSet(), inheritedList, suffix); }
if (src instanceof org.hl7.fhir.r4.model.ValueSet) return convertValueSet((org.hl7.fhir.r4.model.ValueSet) src); throw new FHIRException("Unknown resource "+src.fhirType());
throw new FHIRException("Unknown resource "+src.fhirType());
if (src instanceof org.hl7.fhir.r4.model.ValueSet) return convertValueSet((org.hl7.fhir.r4.model.ValueSet) src); throw new FHIRException("Unknown resource "+src.fhirType());