Ejemplo n.º 1
0
        public FhirConverterWrapper(FhirVersion to, FhirVersion from)
        {
            _converter = new FhirConverter(to, from);

            ToSerializer   = new SerializationWrapper(to);
            FromSerializer = new SerializationWrapper(from);
        }
Ejemplo n.º 2
0
        private async Task <ResourceWrapper> UpdateUsingHttpClientAsync(ResourceWrapper resourceWrapper)
        {
            var serializer = new SerializationWrapper(FhirVersion);
            var request    = new FhirRequestMessage(HttpMethod.Put, resourceWrapper);
            var response   = await CreateOrUpdateAsync(request);

            return(serializer.Parse(response.Content, response.MimeType));
        }
Ejemplo n.º 3
0
 public FhirRequestMessage(HttpMethod method, ResourceWrapper resource, FhirMimeType mimeType = FhirMimeType.Json)
 {
     _method    = method;
     _resource  = resource;
     _mimeType  = mimeType;
     _mediaType = mimeType == FhirMimeType.Json
         ? "application/fhir+json"
         : "application/fhir+xml";
     _serializer = new SerializationWrapper(resource.FhirVersion);
 }