ValueSet Expansion: How to include synonyms?

236 views
Skip to first unread message

joshu...@tempus.com

unread,
Jan 2, 2018, 1:25:00 PM1/2/18
to HAPI FHIR
I've created a CodeSystsem with a bunch of random codes I made up for testing, along with a ValueSet that includes concepts from that codesystem. I also included synonyms in the valueset and want to include them when expanding the valueset. However, I've had no luck in getting the hapi fhir server to include them, despite passing in the params that should do so.

Given the expansion for this ValueSet using the URL 
{{api}}/ValueSet/1234/$expand?includeDesignations=true

I get the following result which does not appear to include designations
{
    "resourceType": "ValueSet",
    "status": "active",
    "compose": {
        "include": [
            {
                "system": "fhir.joshuabell.xyz/code-system/JCC",
                "concept": [
                    {
                        "code": "JCC0001P",
                        "display": "LEAN"
                    },
                    {
                        "code": "JCC0003P"
                    },
                    {
                        "code": "JCC0002P",
                        "display": "Liberation",
                        "designation": [
                            {
                                "use": {
                                    "system": "http://snomed.info/sct",
                                    "code": "900000000000013009",
                                    "display": "Synonym"
                                },
                                "value": "Piberation Laul"
                            },
                            {
                                "use": {
                                    "system": "http://snomed.info/sct",
                                    "code": "900000000000013009",
                                    "display": "Synonym"
                                },
                                "value": "Libations all around"
                            },
                            {
                                "use": {
                                    "system": "http://snomed.info/sct",
                                    "code": "900000000000003001",
                                    "display": "Fully specified name"
                                },
                                "value": "Liberation Paul (liberator) -- asdasd"
                            },
                            {
                                "use": {
                                    "system": "http://snomed.info/sct",
                                    "code": "900000000000550004",
                                    "display": "Definition"
                                },
                                "value": "The mysterous force that comes from paul"
                            }
                        ]
                    }
                ]
            }
        ]
    },
    "expansion": {
        "identifier": "urn:uuid:0879f4fe-d0d5-47ca-9ed0-f07ec26a3512",
        "timestamp": "2018-01-02T12:13:07-06:00",
        "total": 3,
        "contains": [
            {
                "system": "fhir.joshuabell.xyz/code-system/JCC",
                "code": "JCC0001P",
                "display": "LEAN"
            },
            {
                "system": "fhir.joshuabell.xyz/code-system/JCC",
                "code": "JCC0003P",
                "display": "Paul is life"
            },
            {
                "system": "fhir.joshuabell.xyz/code-system/JCC",
                "code": "JCC0002P",
                "display": "Liberation"
            }
        ]
    }
}

You can see that there are only one of the JCC0002P concepts, but I would expect to get several with different displays based on the designations in the valueset. Am I misunderstanding this behavior? Is it possible to have synonyms in our expanded sets?


Info: 
<hapi.version>3.0.0</hapi.version>
<jetty.version>9.4.6.v20170531</jetty.version>

fhir $java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)


joshu...@tempus.com

unread,
Jan 8, 2018, 5:07:17 PM1/8/18
to HAPI FHIR
So I've gone to the implementors chat and it seems that this has never really been decided or fully clarified in the FHIR spec. As it stands now it seems like most implementations interpret ValueSet to have unique concepts by system/code and not display (so it will only include concept once despite having it in multiple times with different displays). The spec doesn't actually say to do this necessarily and is currently under debate on next steps here: https://chat.fhir.org/#narrow/stream/terminology/topic/How.20to.20properly.20represent.20Synonyms

I'll report back here on the results and whether or not HAPI will need to update it's expansion logic to include concept synonyms by the display, which it currently ignores.

Marcelo Cabello

unread,
Oct 23, 2020, 7:43:49 AM10/23/20
to HAPI FHIR
Hi Joshua!
I'm facing the same issue and I would like ask you have you find a nice solution? ...and how? :-)
Kind regards
Marc

Esteban Hebel

unread,
Jul 11, 2021, 10:19:16 AM7/11/21
to HAPI FHIR
Hello everyone!
Have there been any developments in this front?

Thanks,
Esteban

Reply all
Reply to author
Forward
0 new messages