public IIdType getIdElement(FhirContext theContext) { IIdType retVal = null; if (isNotBlank(myIdElement)) { retVal = theContext.getVersion().newIdType().setValue(myIdElement); } return retVal; }
public IIdType getId(FhirContext theCtx) { IIdType retVal = null; if (myId != null) { retVal = theCtx.getVersion().newIdType().setValue(myId); } return retVal; }
public IIdType getPayloadId(FhirContext theCtx) { IIdType retVal = null; if (myPayloadId != null) { retVal = theCtx.getVersion().newIdType().setValue(myPayloadId); } return retVal; }
private IIdType newIdType(String theValue) { return myContext.getVersion().newIdType().setValue(theValue); }
protected static void parseContentLocation(FhirContext theContext, MethodOutcome theOutcomeToPopulate, String theLocationHeader) { if (StringUtils.isBlank(theLocationHeader)) { return; } IIdType id = theContext.getVersion().newIdType(); id.setValue(theLocationHeader); theOutcomeToPopulate.setId(id); }
protected static void parseContentLocation(FhirContext theContext, MethodOutcome theOutcomeToPopulate, String theLocationHeader) { if (StringUtils.isBlank(theLocationHeader)) { return; } IIdType id = theContext.getVersion().newIdType(); id.setValue(theLocationHeader); theOutcomeToPopulate.setId(id); }
@Transactional(propagation = Propagation.REQUIRED) @Override public Resource lookup(Object theAppInfo, String theType, String theId) throws FHIRException { IIdType refId = getContext().getVersion().newIdType(); refId.setValue(theType + "/" + theId); IFhirResourceDao<? extends IBaseResource> dao = getDao(theType); BaseHasResource id = dao.readEntity(refId); return (Resource) toResource(id, false); }
private IIdType newIdType(String theResourceType, String theResourceId, String theVersion) { org.hl7.fhir.r4.model.IdType id = new org.hl7.fhir.r4.model.IdType(theResourceType, theResourceId, theVersion); return myContext.getVersion().newIdType().setValue(id.getValue()); }
@Override public void run(CommandLine theCommandLine) throws ParseException { parseFhirContext(theCommandLine); String targetServer = theCommandLine.getOptionValue("t"); if (isBlank(targetServer)) { throw new ParseException("No target server (-t) specified"); } else if (targetServer.startsWith("http") == false) { throw new ParseException("Invalid target server specified, must begin with 'http'"); } FhirContext ctx = getFhirContext(); String exclude = theCommandLine.getOptionValue("e"); if (isNotBlank(exclude)) { for (String next : exclude.split(",")) { if (isNotBlank(next)) { IIdType id = ctx.getVersion().newIdType(); id.setValue(next); myExcludes.add(id); } } } if (ctx.getVersion().getVersion() == FhirVersionEnum.DSTU2) { uploadDefinitionsDstu2(theCommandLine, ctx); } else if (ctx.getVersion().getVersion() == FhirVersionEnum.DSTU3) { uploadDefinitionsDstu3(theCommandLine, ctx); } else if (ctx.getVersion().getVersion() == FhirVersionEnum.R4) { uploadDefinitionsR4(theCommandLine, ctx); } }
private IIdType store(@ResourceParam T theResource, String theIdPart, Long theVersionIdPart) { IIdType id = myFhirContext.getVersion().newIdType(); String versionIdPart = Long.toString(theVersionIdPart); id.setParts(null, myResourceName, theIdPart, versionIdPart);
String contentLocation = theRequest.getHeader(Constants.HEADER_CONTENT_LOCATION); if (contentLocation != null) { id = myFhirContext.getVersion().newIdType(); id.setValue(contentLocation); requestDetails.setId(id);
IIdType id = myContext.getVersion().newIdType(); id.setValue(theResourceType + '/' + resourceId.getValue()); idSubstitutions.put(id, newId);
private DaoMethodOutcome toMethodOutcome(@Nonnull final ResourceTable theEntity, @Nonnull IBaseResource theResource) { DaoMethodOutcome outcome = new DaoMethodOutcome(); IIdType id = null; if (theResource.getIdElement().getValue() != null) { id = theResource.getIdElement(); } if (id == null) { id = theEntity.getIdDt(); if (getContext().getVersion().getVersion().isRi()) { id = getContext().getVersion().newIdType().setValue(id.getValue()); } } outcome.setId(id); outcome.setResource(theResource); outcome.setEntity(theEntity); return outcome; }
QualifiedParamList orParamList = QualifiedParamList.splitQueryStringByCommasIgnoreEscape(null, nextIdValue); for (String next : orParamList) { IIdType nextId = ctx.getVersion().newIdType().setValue(next); if (nextId.hasIdPart()) { if (!nextId.hasResourceType()) {
protected void updateResourceMetadata(IBaseResourceEntity theEntity, IBaseResource theResource) { IIdType id = theEntity.getIdDt(); if (getContext().getVersion().getVersion().isRi()) { id = getContext().getVersion().newIdType().setValue(id.getValue()); } if (id.hasResourceType() == false) { id = id.withResourceType(theEntity.getResourceType()); } theResource.setId(id); if (theResource instanceof IResource) { ResourceMetadataKeyEnum.VERSION.put((IResource) theResource, id.getVersionIdPart()); ResourceMetadataKeyEnum.UPDATED.put((IResource) theResource, theEntity.getUpdated()); } else { IBaseMetaType meta = theResource.getMeta(); meta.setVersionId(id.getVersionIdPart()); meta.setLastUpdated(theEntity.getUpdatedDate()); } }
protected static void parseContentLocation(FhirContext theContext, MethodOutcome theOutcomeToPopulate, String theLocationHeader) { if (StringUtils.isBlank(theLocationHeader)) { return; } IIdType id = theContext.getVersion().newIdType(); id.setValue(theLocationHeader); theOutcomeToPopulate.setId(id); }
protected static void parseContentLocation(FhirContext theContext, MethodOutcome theOutcomeToPopulate, String theLocationHeader) { if (StringUtils.isBlank(theLocationHeader)) { return; } IIdType id = theContext.getVersion().newIdType(); id.setValue(theLocationHeader); theOutcomeToPopulate.setId(id); }
operation = nextString; } else { id = myFhirContext.getVersion().newIdType(); id.setParts(null, resourceName, UrlUtil.unescape(nextString), null);
@Transactional(propagation = Propagation.REQUIRED) @Override public Resource lookup(Object theAppInfo, String theType, String theId) throws FHIRException { IIdType refId = getContext().getVersion().newIdType(); refId.setValue(theType + "/" + theId); IFhirResourceDao<? extends IBaseResource> dao = getDao(theType); BaseHasResource id = dao.readEntity(refId); return (Resource) toResource(id, false); }
outcome.setEntity(entity); IIdType id = getContext().getVersion().newIdType(); id.setValue(entity.getIdDt().getValue()); outcome.setId(id);