Search in sources :

Example 1 with UserInfo

use of uk.nhs.adaptors.scr.clients.identity.UserInfo in project summary-care-record-api by NHSDigital.

the class AcsService method setPermission.

public void setPermission(RequestData requestData) {
    Parameters parameters = fhirParser.parseResource(requestData.getBody(), Parameters.class);
    ParametersParameterComponent parameter = getSetPermissionParameter(parameters);
    UserInfo userInfo = identityService.getUserInfo(requestData.getAuthorization());
    String acsRequest = prepareAcsRequest(parameter, requestData, getUserRoleCode(userInfo, requestData.getNhsdSessionUrid()), userInfo.getId());
    Response<Document> response = spineClient.sendAcsData(acsRequest, requestData.getNhsdAsid());
    spineDetectedIssuesHandler.handleDetectedIssues(spineResponseParser.getDetectedIssues(response.getBody()));
}
Also used : Parameters(org.hl7.fhir.r4.model.Parameters) UserInfo(uk.nhs.adaptors.scr.clients.identity.UserInfo) Document(org.w3c.dom.Document) ParametersParameterComponent(org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent)

Aggregations

Parameters (org.hl7.fhir.r4.model.Parameters)1 ParametersParameterComponent (org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent)1 Document (org.w3c.dom.Document)1 UserInfo (uk.nhs.adaptors.scr.clients.identity.UserInfo)1