Used R4 structures and the REST client to build Patient, Practitioner, ServiceRequest, DocumentReference, MedicationRequest, Condition, and Provenance after clinician confirm. On Java 21, setId returning a base type broke new and existing providers and a test until helpers unchained the calls. No transaction endpoint, so promotion posted resources one by one.
- What worked
- R4 resource types covered the confirm-to-index mapping. Once setId was isolated, providers compiled and bundle-factory tests could run.
- What got in the way
- Fluent setId was not Java-21-inference friendly and failed the build across modules. The server lacked a system/transaction provider, so atomic bundle submit was abandoned. MedicationRequest setters needed extra caution.