FHIR Chat · datatype of address · implementers

Stream: implementers

Topic: datatype of address


view this post on Zulip Dongtu (Jul 26 2019 at 06:56):

Data type format Addressss where city, district, state items are defining String data types. In the description specify the name. Can I use String code not name? So is there a violation of rules?

view this post on Zulip Grahame Grieve (Jul 26 2019 at 09:51):

what would it mean to use code instead of string?

view this post on Zulip Dongtu (Jul 26 2019 at 12:03):

I still use string type not code type. I mean I don't want send name of city,distict,state. I want send code of city.
ex: "address": [ {
"city":"001",
"district":"02131",
"state":"04354323",
}]

instead of : "address": [ {
"city":"New York",
"district":"ABC",
"state":"XYZZZ",
}]

view this post on Zulip Lloyd McKenzie (Jul 26 2019 at 14:50):

There's two options here. If the code is still appropriate for a human to see (e.g. NY, AB, FL), then you can define a value set and constrain the state or country to be picked from that list of values. However, if you have numeric codes that aren't meaningful to a human, you'd need to use an extension, so it would look like this:
"address": [{
"city": "New York",
"_city": {
"extension":[{
"url":"some-city-code-url",
"valueCode":"001"
}]
},
etc.
}]

view this post on Zulip Lloyd McKenzie (Jul 26 2019 at 14:51):

Note that you could send just the extension and not the city name, but this would generally be bad practice as the instance would be useless to anyone who didn't recognize the extension


Last updated: Apr 12 2022 at 19:14 UTC