mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-02-08 05:58:27 +00:00
Merge pull request #404 from mion00/fix-id-dstu2org
Fix missing ID with JAX-RS and DSTU2 RI
This commit is contained in:
commit
d0383a29da
@ -137,7 +137,7 @@ public class JaxRsRequest extends RequestDetails {
|
||||
FhirVersionEnum fhirContextVersion = myServer.getFhirContext().getVersion().getVersion();
|
||||
|
||||
if (StringUtils.isNotBlank(myVersion)) {
|
||||
if (FhirVersionEnum.DSTU3.equals(fhirContextVersion)) {
|
||||
if (FhirVersionEnum.DSTU3.equals(fhirContextVersion) || FhirVersionEnum.DSTU2_HL7ORG.equals(fhirContextVersion)) {
|
||||
result.setId(
|
||||
new IdType(myServer.getBaseForRequest(), UrlUtil.unescape(myId), UrlUtil.unescape(myVersion)));
|
||||
} else if (FhirVersionEnum.DSTU2.equals(fhirContextVersion)) {
|
||||
@ -145,7 +145,7 @@ public class JaxRsRequest extends RequestDetails {
|
||||
new IdDt(myServer.getBaseForRequest(), UrlUtil.unescape(myId), UrlUtil.unescape(myVersion)));
|
||||
}
|
||||
} else if (StringUtils.isNotBlank(myId)) {
|
||||
if (FhirVersionEnum.DSTU3.equals(fhirContextVersion)) {
|
||||
if (FhirVersionEnum.DSTU3.equals(fhirContextVersion) || FhirVersionEnum.DSTU2_HL7ORG.equals(fhirContextVersion)) {
|
||||
result.setId(new IdType(myServer.getBaseForRequest(), UrlUtil.unescape(myId)));
|
||||
} else if (FhirVersionEnum.DSTU2.equals(fhirContextVersion)) {
|
||||
result.setId(new IdDt(myServer.getBaseForRequest(), UrlUtil.unescape(myId)));
|
||||
@ -155,7 +155,7 @@ public class JaxRsRequest extends RequestDetails {
|
||||
if (myRestOperation == RestOperationTypeEnum.UPDATE) {
|
||||
String contentLocation = result.getHeader(Constants.HEADER_CONTENT_LOCATION);
|
||||
if (contentLocation != null) {
|
||||
if (FhirVersionEnum.DSTU3.equals(fhirContextVersion)) {
|
||||
if (FhirVersionEnum.DSTU3.equals(fhirContextVersion) || FhirVersionEnum.DSTU2_HL7ORG.equals(fhirContextVersion)) {
|
||||
result.setId(new IdType(contentLocation));
|
||||
} else if (FhirVersionEnum.DSTU2.equals(fhirContextVersion)) {
|
||||
result.setId(new IdDt(contentLocation));
|
||||
|
Loading…
x
Reference in New Issue
Block a user