Thanks @lloyd,
Can you guide me what could be wrong? Not validating…
Below is the Profile and the test performed:
Profile:
{
“resourceType”: “StructureDefinition”,
“id”: “patientidentifiersystem”,
“identifier”: [
{
“system”: “patientIdentifierSystem”,
“value”: “patientIdentifierSystem”
}
],
“url”: “http://empresa.br/fhir/us/core/StructureDefinition/patientIdentifierSystem”,
“version”: “0.0.1”,
“name”: “USCorePatientIdentifierSystemProfile”,
“title”: “US Core Patient Identifier System Profile”,
“status”: “draft”,
“experimental”: true,
“date”: “2022-07-26T15:00:00-03:00”,
“publisher”: “HL7 International - Cross-Group Projects”,
“description”: “Profile para realizar a validação do conteúdo que esta sendo enviado no payload de entrada.”,
“jurisdiction”: [
{
“coding”: [
{
“system”: “urn:iso:std:iso:3166”,
“code”: “US”
}
]
}
],
“fhirVersion”: “4.0.1”,
“kind”: “resource”,
“abstract”: false,
“type”: “Patient”,
“baseDefinition”: “http://hl7.org/fhir/StructureDefinition/Patient”,
“derivation”: “constraint”,
“snapshot”: {
“element”: [
{
“id”: “Patient.identifier.system”,
“path”: “Patient.identifier.system”,
“min”: 1,
“max”: “1”,
“base”: {
“path”: “Identifier.system”,
“min”: 0,
“max”: “1”
},
“type”: [
{
“code”: “uri”
}
],
“constraint”: [
{
“key”: “regra-idenfier-system”,
“severity”: “error”,
“human”: “Validate that the ‘identifier.system’ element has ‘validate-company’ content”,
“expression”: “identifier.where(system = ‘validate-company’).exists()”,
“source”: “http://hl7.org/fhir/StructureDefinition/Element”
}
],
“definition”: “Establishes the namespace for the value - that is, a URL that describes a set values that are unique.”,
“mustSupport”: true,
“isModifier”: false,
“isSummary”: true
}
]
}
}
Validation Request:
curl --location --request POST ‘https://hostname.br/v1/projects/{{PROJECT_ID}}/locations/us-central1/datasets/{{DATA_SET}}/fhirStores/{{FHIR_STORE}}/fhir/Patient/$validate?profile=http://empresa.br/fhir/us/core/StructureDefinition/patientIdentifierSystem’
–header ‘Authorization: Bearer key’
–header ‘Content-Type: application/json’
–header ‘charset: utf-8’
–data-raw ‘{
“identifier”: [
{
“system”: “notFound”,
“value”: “00000000000000001”
}
],
“name”: [
{
“use”: “temp”,
“text”: “Patient com 00000000000000001”
}
],
“gender”: “male”,
“meta”: {
“source”: “teste-restricao”
},
“resourceType”: “Patient”
}’
Result:
{
"issue": [
{
"code": "informational",
"details": {
"text": "success"
},
"diagnostics": "success",
"severity": "information"
}
],
"resourceType": "OperationOutcome"
}
Thanks.