Using objects instead of Array in Fhir Identities and other related date structures #747
ashfahan
started this conversation in
OpenSRP Web FHIR
Replies: 1 comment
-
This sounds very reasonable but I am afraid it would not be following the spec. It would make our fhir instance not conform to the fhir spec, negating the biggest advantage of Fhir which is interoperability. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using objects instead of array can provide us serval improvements in code. i.e having Record<string, T> where T is the payload object type
like instead of using this code
team?.identifier?.find((e) => e.use === 'official')?.value
we can simply useteam?.identifier?.official?.value
which array can we change (i only noticed these in code)
which will
we can use this function like this to convert array into object to achieve the same result
Beta Was this translation helpful? Give feedback.
All reactions