Stream: hapi
Topic: types
Brian Postlethwaite (Apr 02 2016 at 08:26):
@James Agnew wondering if your java implementation does any fancy stuff with the polymorphic types like MedicationOrder.Medication (which can be a codableConcept or a resource reference)
Brian Postlethwaite (Apr 02 2016 at 08:27):
Wondering if you add extra non serializing helper properties of the appropriate cast like medicationCodeableConcept and medicationReference (or something like this)
James Agnew (Apr 02 2016 at 16:08):
Well, there are a bunch of getters for things like this, but they aren't fancy at all. Just helpers to take care of casting really.
public Type getMedication(); public CodeableConcept getMedicationCodeableConcept(); public boolean hasMedicationCodeableConcept(); public Reference getMedicationReference(); public boolean hasMedicationReference(); public boolean hasMedication();
Brian Postlethwaite (Apr 02 2016 at 21:36):
Getters only? Not properties that do the casting both ways?
James Agnew (Apr 03 2016 at 14:07):
There's also a
public void setMedication(Type theMedication);
..which handles either case. I guess it might be a good idea to have two specific setters too, but at this point we don't have that. Do you have something more fancy in mind for .NET?
Last updated: Apr 12 2022 at 19:14 UTC