Skip to content

OperationOutcome "Patient // OperationOutcome.Location is deprecated, please use OperationOutcome.Expression" #3119

Open
@arjun8001

Description

@arjun8001

Describe the bug
I stored my custom FHIR profile, and even though it stores the profile properly, it is unable to create and validate new resource properly.

FHIR Version?
Stu3/R4/R5
Stu3

Data provider?
CosmosDB/SQL Server

To Reproduce
Steps to reproduce the behavior:

  1. Create Patient Profile structure as given below. Using POSTMAN
    x-ms-profile-validation is set to TRUE
    POST {{fhirurl}}/StructureDefinition

Body

{
  "resourceType": "StructureDefinition",
  "url": "http://cihi.ca/fhir/nsir/StructureDefinition/TutorialPatient",
  "name": "TutorialPatient",
  "status": "draft",
  "fhirVersion": "3.0.2",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "min": 1
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "min": 1
      }
    ]
  }
}

  1. Create new Patient
{
    "resourceType" : "Patient",
    "meta" : {
        "profile":[
            "http://cihi.ca/fhir/nsir/StructureDefinition/TutorialPatient"
        ]
    },
    "birthDate": "1950-01-02", 
    "gender": "male",
    "identifier": [
        {
            "system": "http://example.com/something",
            "value": "test"
        }
    ],
    "name": [
        {
            "use":"official",
            "given": ["ABC"],
            "family": "DEF"

        }
        
    ]
}

Expected behavior

Once you create, it should give you below

{
    "resourceType": "Patient",
    "id": "25b4123e-4123-48c1-9e84-9605cef78ea3",
    "meta": {
        "versionId": "1",
        "lastUpdated": "2023-02-13T21:48:40.303+00:00",
        "profile": [
            "http://cihi.ca/fhir/nsir/StructureDefinition/TutorialPatient"
        ]
    },
    "identifier": [
        {
            "system": "http://example.com/something",
            "value": "arjun"
        }
    ],
    "name": [
        {
            "use": "official",
            "family": "DEF",
            "given": [
                "ABC"
            ]
        }
    ],
    "gender": "male",
    "birthDate": "1950-01-02"
}

Actual behavior
When I try to create new Patient, I receive this error
POST {{fhirurl}}/Patient

{
    "resourceType": "OperationOutcome",
    "id": "31a5faf4ba6c5f8b5777be0a9eb836be",
    "meta": {
        "lastUpdated": "2023-02-13T22:03:37.6992072+00:00"
    },
    "issue": [
        {
            "severity": "error",
            "code": "incomplete",
            "details": {
                "coding": [
                    {
                        "system": "http://hl7.org/fhir/dotnet-api-operation-outcome",
                        "code": "4000"
                    }
                ],
                "text": "Unable to resolve reference to profile 'http://cihi.ca/fhir/nsir/StructureDefinition/TutorialPatient'"
            },
            "location": [
                "Patient // OperationOutcome.Location is deprecated, please use OperationOutcome.Expression"
            ],
            "expression": [
                "Patient"
            ]
        }
    ]
}

After hitting POST second time, the new patient is created.

Same is happening when I try to validate.

AB#101364

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions