microsoft / microsoft/fhir-server

CodeableConcept.coding.display and extension.valueString is trimming leading and trailing spaces

Open
#3,815 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
TSQL
Stars
1.4k
Forks
592
Avg merge
2d 7h
Merged PRs (30d)
41

Description

Describe the bug
Save a fhir resource having codeableConcept: coding and extension objects with leading and trailing spaces as shown below:

"code": {
"coding": [
{
"extension": [
{
"url": "http://test.com/AVALUE"
, "valueString": " SOME VALUE "
}
],
"system": "http://test.com/DR/Code"
, "code": "SOMECODE",
"display": " SOME DESCRIPTION "
}
}

Retrieve the fhir resource having this codeableConcept, the values are trimmed for extension.valueString and Coding.display
"coding": [
{
"extension": [
{
"url": "http://test.com/AVALUE"
, "valueString": "SOME VALUE"
}
],
"system": "http://test.com/DR/Code"
, "code": "SOMECODE",
"display": "SOME DESCRIPTION"
}
}

FHIR Version?
R4

To Reproduce
Steps to reproduce the behavior:

  1. Create a resource with Codeable concept.
  2. Add some leading and trailing spaces for coding.display and coding.extension.valueString field.
  3. Save fhir resource.
  4. retrieve the fhir resource back.

Expected behavior
The Coding.display and extension.valueString should retain trailing and leading spaces.

Actual behavior
coding.extension.valueString and coding.display values are trimmed.

AB#119105

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing an R4 resource round trip using CodeableConcept.coding.display and extension.valueString with leading and trailing spaces. Trace where those values are changed during save and retrieval; done means both fields retain the original spaces after retrieval.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.