예제 #1
0
        public async SystemTasks.Task <NrlsCreateResponse> CreatePointer(NrlsPointerRequest pointerRequest, DocumentReference pointer)
        {
            var newPointer = await _fhirConnector.RequestOne <CommandRequest, FhirResponse>(BuildPostRequest(pointerRequest.Asid, pointerRequest.JwtOrgCode, pointer));

            var createResponse = new NrlsCreateResponse
            {
                Resource         = newPointer.GetResource <OperationOutcome>(),
                ResponseLocation = newPointer.ResponseLocation
            };

            return(createResponse);
        }
        public async SystemTasks.Task <NrlsCreateResponse> CreatePointer(NrlsPointerRequest pointerRequest, DocumentReference pointer)
        {
            var pointerJson = new FhirJsonSerializer().SerializeToString(pointer);
            var content     = new StringContent(pointerJson, Encoding.UTF8, $"{ContentType.JSON_CONTENT_HEADER }; charset={Encoding.UTF8.WebName}");

            var newPointer = await new FhirConnector().RequestOne(BuildPostRequest(pointerRequest.Asid, pointerRequest.JwtOrgCode, content));

            var createResponse = new NrlsCreateResponse
            {
                Resource         = newPointer.GetResource <OperationOutcome>(),
                ResponseLocation = newPointer.ResponseLocation
            };

            return(createResponse);
        }