Profiles

237 views
Skip to first unread message

David Kincaid

unread,
Jan 23, 2015, 10:18:09 PM1/23/15
to hapi...@googlegroups.com
Is there somewhere I can look to see how to implement a Profile using HAPI-FHIR? I'm using the dev structures and I'm not really sure how to go about implementing a Profile in my server.

Thanks,

Dave

James Agnew

unread,
Feb 3, 2015, 9:59:16 AM2/3/15
to David Kincaid, hapi...@googlegroups.com
Hi David,

Sorry for the slow response, I was away on vacation for two weeks and my emails really piled up during that time! :)

Depends on what type of thing you're trying to accomplish. Do you have someone else's profile definition and you want to create a message that conforms to it? Or are you trying to define your own profile by taking a resource type and adding some extensions for your specific use cases to it? Or something else?

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/1a37d0aa-4d10-4276-8919-29e6c91d61a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Kincaid

unread,
Feb 3, 2015, 11:45:20 AM2/3/15
to hapi...@googlegroups.com, kincai...@gmail.com
Trying to create our own profiles. I figured out how to create an extension from the documentation on the HAPI-FHIR web site under "Profiles & Extensions", but there isn't anything there on profiles. I want to create a profile that constrains the Patient resource and adds our extension.

- Dave

James Agnew

unread,
Feb 6, 2015, 4:08:48 PM2/6/15
to David Kincaid, hapi...@googlegroups.com
Ah ok.

I guess the answer lies with what you are looking to do with your profile. If you have followed the instructions to add extensions to your own custom type, and you use that type on a server, you'll actually automatically get a profile generated. You need to give your custom type a profile ID by setting the ID in your @ResourceDef annotation, e.g.
@ResourceDef(name="Patient", id="mypatient")
Once you do this, the server automatically exports a profile at the address:
http://[base]/Profile/mypatient

If you're looking to constrain, things are a little bit less clear. We haven't implemented the ability to constrain using profiles yet, mostly because it hasn't been clear what people want to do. It seems like the something that would be great to have would be the ability for you to define a constrained profile using the "Forge" tool produced by Furore and then we could have HAPI's code generator turn that into a custom type for you that enforces all of your constraints at compile time. If that sounds like something that would suit your requirements, maybe we could collaborate on getting that going?

Cheers,
James

David Kincaid

unread,
Feb 6, 2015, 8:24:01 PM2/6/15
to hapi...@googlegroups.com, kincai...@gmail.com
Thanks for the reply. Let me get my thoughts together on this and I'll write up some more details on what I think we want to do. We are in the veterinary medicine space, so some of the requirements for patient resources and related person resources will be unique to that space.

- Dave
Reply all
Reply to author
Forward
0 new messages