throw new InternalErrorException("Method " + getMethod().getName() + " in type " + getMethod().getDeclaringClass().getCanonicalName() + " returned null, which is not allowed for create operation"); if (response.getCreated() == null || Boolean.TRUE.equals(response.getCreated())) { return Constants.STATUS_HTTP_201_CREATED; if (response == null || response.getCreated() == null || Boolean.FALSE.equals(response.getCreated())) { return Constants.STATUS_HTTP_200_OK;
.execute(); if (Boolean.TRUE.equals(methodOutcome.getCreated())) { ourLog.info("Created new ConceptMap: {}", methodOutcome.getId().getValue()); } else { .execute(); if (Boolean.TRUE.equals(methodOutcome.getCreated())) { ourLog.info("Created new ConceptMap: {}", methodOutcome.getId().getValue()); } else {
throw new InternalErrorException("Method " + getMethod().getName() + " in type " + getMethod().getDeclaringClass().getCanonicalName() + " returned null, which is not allowed for create operation"); if (response.getCreated() == null || Boolean.TRUE.equals(response.getCreated())) { return Constants.STATUS_HTTP_201_CREATED; if (response == null || response.getCreated() == null || Boolean.FALSE.equals(response.getCreated())) { return Constants.STATUS_HTTP_200_OK;
Boolean created = outcome.getCreated();
@Override public boolean enrichAuditDatasetFromResponse(GenericFhirAuditDataset auditDataset, Object response, AuditContext auditContext) { // Domain Resource in the request? Extract Patient ID and Sensitivity at this point if (response instanceof IDomainResource) { addResourceData(auditDataset, (T) response); } if (response instanceof MethodOutcome) { MethodOutcome methodOutcome = (MethodOutcome) response; if (methodOutcome.getCreated() != null && methodOutcome.getCreated()) { auditDataset.setEventOutcomeIndicator(EventOutcomeIndicator.Success); } if (methodOutcome.getOperationOutcome() != null) { super.enrichAuditDatasetFromResponse(auditDataset, methodOutcome.getOperationOutcome(), auditContext); } else { auditDataset.setEventOutcomeIndicator(EventOutcomeIndicator.Success); } if (methodOutcome.getResource() != null && methodOutcome.getResource() instanceof IDomainResource) { addResourceData(auditDataset, (T) methodOutcome.getResource()); } else if (methodOutcome.getId() != null) { auditDataset.setResourceId(methodOutcome.getId()); if (methodOutcome.getId().hasResourceType()) { auditDataset.setAffectedResourceType(methodOutcome.getId().getResourceType()); } } } return super.enrichAuditDatasetFromResponse(auditDataset, response, auditContext); }
@Override public boolean enrichAuditDatasetFromResponse(GenericFhirAuditDataset auditDataset, Object response, AuditContext auditContext) { // Domain Resource in the request? Extract Patient ID and Sensitivity at this point if (response instanceof IDomainResource) { addResourceData(auditDataset, (T) response); } if (response instanceof MethodOutcome) { MethodOutcome methodOutcome = (MethodOutcome) response; if (methodOutcome.getCreated() != null && methodOutcome.getCreated()) { auditDataset.setEventOutcomeIndicator(EventOutcomeIndicator.Success); } if (methodOutcome.getOperationOutcome() != null) { super.enrichAuditDatasetFromResponse(auditDataset, methodOutcome.getOperationOutcome(), auditContext); } else { auditDataset.setEventOutcomeIndicator(EventOutcomeIndicator.Success); } if (methodOutcome.getResource() != null && methodOutcome.getResource() instanceof IDomainResource) { addResourceData(auditDataset, (T) methodOutcome.getResource()); } else if (methodOutcome.getId() != null) { auditDataset.setResourceId(methodOutcome.getId()); if (methodOutcome.getId().hasResourceType()) { auditDataset.setAffectedResourceType(methodOutcome.getId().getResourceType()); } } } return super.enrichAuditDatasetFromResponse(auditDataset, response, auditContext); }