FHIR Chat · Compare Extensions · hapi

Stream: hapi

Topic: Compare Extensions


view this post on Zulip Yunwei Wang (Jun 03 2020 at 16:41):

I need to compare two extensions to check if they are the same (same url and same value(x)). Object.equals(obj) does not work since that compares only reference. I think I can convert extensions to JSON strings and compare these two strings. Is there better way to compare two FHIR elements?
Also how do I convert an FHIR type to JSON? IParser.encodeResourceToString takes IBaseResource though I need on data type level.

view this post on Zulip Grahame Grieve (Jun 03 2020 at 18:56):

.equalsDeep()


Last updated: Apr 12 2022 at 19:14 UTC