Prerequisites
Registered sandbox application, OAuth client, approved Observation scope and synthetic subject.
DEVELOPER
Complete one synthetic end-to-end Observation flow while preserving identity, scope, FHIR semantics, idempotency and correlation.
Registered sandbox application, OAuth client, approved Observation scope and synthetic subject.
Use the client type and OAuth 2.1/OIDC flow assigned to the application; user-facing clients use Authorization Code + PKCE.
Send a FHIR R4 Observation with synthetic identifiers and an idempotency key.
Inspect status, correlation ID and integration logs; deliberately repeat the request to validate idempotency.
curl -X POST https://sandbox.example.invalid/fhir/Observation \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/fhir+json" \
-H "Idempotency-Key: demo-obs-001" \
--data '{"resourceType":"Observation","status":"final","subject":{"reference":"Patient/synthetic-001"},"code":{"text":"Synthetic systolic blood pressure"},"valueQuantity":{"value":120,"unit":"mmHg"}}'
var req = HttpRequest.newBuilder(URI.create(base + "/fhir/Observation"))
.header("Authorization", "Bearer " + token)
.header("Content-Type", "application/fhir+json")
.header("Idempotency-Key", "demo-obs-001")
.POST(HttpRequest.BodyPublishers.ofString(syntheticObservationJson))
.build();
var res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
const res = await fetch(`${base}/fhir/Observation`, {
method: "POST",
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/fhir+json", "Idempotency-Key": "demo-obs-001" },
body: JSON.stringify(syntheticObservation)
});
if (!res.ok) throw await res.json();
val request = Request.Builder()
.url("$base/fhir/Observation")
.header("Authorization", "Bearer $token")
.header("Content-Type", "application/fhir+json")
.header("Idempotency-Key", "demo-obs-001")
.post(syntheticObservationJson.toRequestBody("application/fhir+json".toMediaType()))
.build()
var request = URLRequest(url: URL(string: base + "/fhir/Observation")!)
request.httpMethod = "POST"
request.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization")
request.setValue("application/fhir+json", forHTTPHeaderField: "Content-Type")
request.setValue("demo-obs-001", forHTTPHeaderField: "Idempotency-Key")
request.httpBody = syntheticObservationData
Quick Start proves only a synthetic Observation path. Production requires real integration ownership, approved scopes, credential protection, error/retry tests, monitoring and recovery evidence.