You are trying to convert an object to FHIR format. There is no generic solution which can do that for you. You can always print out the serialized json of the object and ask copilot to convert to FHIR format. You can also use microsoft's AI offering here : https://learn.microsoft.com/en-us/azure/ai-services/language-service/text-analytics-for-health/overview?tabs=ner