Closed LodewijkSioen closed 3 weeks ago
Describe the bug Both the ResourceBase property and the ResourceIdentity extension method produce strange results
ResourceBase
ResourceIdentity
To Reproduce The following code:
var client = new FhirClient("http://localhost:8080"); var patient = new Patient(); Console.WriteLine("Unsaved Patient"); Console.WriteLine(patient.ResourceBase); Console.WriteLine(patient.ResourceIdentity()); Console.WriteLine("Saved Patient"); var newPatient = await client.CreateAsync(patient); Console.WriteLine(newPatient.ResourceBase); Console.WriteLine(newPatient.ResourceIdentity()); Console.WriteLine("Read Patient"); var patientGet = await client.ReadAsync<Patient>($"Patient/{newPatient.Id}"); Console.WriteLine(patientGet.ResourceBase); Console.WriteLine(patientGet.ResourceIdentity());
Produces:
Unsaved Patient Saved Patient http://localhost:8080/Patient http://localhost:8080/Patient/Patient/fc4a7d76-cf89-4513-8ae1-23cb4344e521/_history/1 Read Patient http://localhost:8080/Patient/fc4a7d76-cf89-4513-8ae1-23cb4344e521 http://localhost:8080/Patient/fc4a7d76-cf89-4513-8ae1-23cb4344e521/Patient/fc4a7d76-cf89-4513-8ae1-23cb4344e521/_history/1
Expected behavior I think ResourceBase should always return http://localhost:8080 in this case. That should fix ResourceIdentity
http://localhost:8080
Version used:
Describe the bug Both the
ResourceBase
property and theResourceIdentity
extension method produce strange resultsTo Reproduce The following code:
Produces:
Expected behavior I think
ResourceBase
should always returnhttp://localhost:8080
in this case. That should fixResourceIdentity
Version used: