FHIR Chat · new custom profiles query · hapi

Stream: hapi

Topic: new custom profiles query


view this post on Zulip Georg Fette (Dec 05 2018 at 16:16):

Hello,
I have developed some custom profiles and have written corresponding java classes which I added to HAPI. I imitated the style of the Java classes of the official profiles. I managed to add instances of my custom profiles to my cli-server and can retrieve them when I make a programatic search to all instances of my profile class. However, when restrict the search with constrains with a "where"-part I do not get any results. Could somebody give me an advice how to analyse my problem ? I would like to put some breakpoints in the running server to observe the querying process. Where could I start best with inserting some breakpoints ?
Greetings

view this post on Zulip Georg Fette (Dec 05 2018 at 18:46):

Another problem I just encountered is that nested structures/classes inside my custom profiles are somehow not stored. When I read an instance of my custom profile from the .json file and inspect the runtime object in the debugger, the fields for the nested structures are filled. When I store the instance in the server via "MethodOutcome execute = client.create().resource(res).execute();" the instance is stored, but in the resource instance contained in the returned MethodOutcome the nested structures are null. What do I have to check ? The nested class is static and derived from BackboneElement, it has a fully functioning copy method, an empty constructor, it is annotated with "Block". The custom profile class has a public field of the type of the nested class, which is annotated with "child" with all necessary annotations-fields. The primitive fields of my custom profile resource work as expected and are contained in the returned object. Only the nested custom classes are missing.

view this post on Zulip Georg Fette (Dec 06 2018 at 09:01):

ah, the null values were a result of missing isEmpty methods of the nested classes. Now the fields are correctly filled.

view this post on Zulip Georg Fette (Dec 06 2018 at 13:09):

hm, one thing I did not imitate from the official profiles are the methods "listChildren", "getNamedProperty", "getProperty", "setProperty", "makeProperty", "getTypesForProperty", "addChild". Are they a vital part of the search process ? How are the _hash values generated that are used within some of these methods ? Are those simply hashes of the Strings of the corresponding field-names ?


Last updated: Apr 12 2022 at 19:14 UTC