Hello,
we are working on a claim processing platform which would route the fhir bundle from provider system to payer system via the claim processing platform. attached the bundle request and response. Can bundle have profiles? Would it be good if we bundle message header and profiles? Also how to customize FHIR server response?
Yes, you can profile Bundle - though all you’d generally need to do is assert that the first entry needs to be a MessageHeader adhering to a particular profile. The profile on the MessageHeader and everything it references would enforce the rest of the rules. To fully define a messaging interface, you need MessageDefinition - that allows you to define what the allowed response (or set of alternative responses) is. If you don’t actually need messaging for routing purposes, you could also look at the process claim operation.