Base Patient resource has identifier with cardinality 0 -> many. We have profile based on Patient where we have identifier 1 -> 1.
So how the output json should look like ?
"identifier": {
"system" : "some-system.url",
"code" : "code121"
}
as json object or
"identifier": [
{
"system" : "some-system.url",
"code" : "code121"
}
]
as array
Look to https://www.hl7.org/fhir/profiling.html#cardinality "Note that though a profile can constrain an element from x..* to x..1, this doesn't make any difference to the representation in the JSON format - the element will still be represented in an array."