minha_1268
02/27/2025, 5:21 AMcreateResourceIfNoneExist as below and it kept returning the error.
const practitionerResource = await medplum.createResourceIfNoneExist(
practitioner,
`identifier=https://example.com/practitioner|${uuid}`,
);
d: Invalid uri format (Practitioner.qualification[0].identifier[0].system)
I have tried to find a regular identifier, not the one in the qualification field, however, the function was only looking for the qualification one.
To confirm the bug, I use the search function to see if identifier is a valid parameter.
const searchResult = await medplum.search("Practitioner", {
_count: 1,
identifier: `https://example.com/practitioner|0dd84b13-1008-4e9a-b0cd-4957f016359c`,
});
console.log(JSON.stringify(searchResult, null, 2));
Received the response as below.
{
"resourceType": "Bundle",
"type": "searchset",
"entry": [
{
"fullUrl": "http://localhost:8103/fhir/R4/Practitioner/019545cb-8b40-71be-b534-ca9034d03997",
"search": {
"mode": "match"
},
"resource": {
"resourceType": "Practitioner",
"identifier": [
{
"system": "https://example.com/practitioner",
"value": "0dd84b13-1008-4e9a-b0cd-4957f016359c"
}
],
"id": "019545cb-8b40-71be-b534-ca9034d03997",
...
}
}
}
],
Is this a bug? or if I use the function the wrong way, please let me know.
Thank you very much in advance!
cc @two4zero_63114nathan-watkins-unityai
02/27/2025, 5:34 PMpractitioner variable? Perhaps its qualification[0].identifier[0].system is invalidminha_1268
03/06/2025, 1:12 AMqualification[0].identifier[0].system field so that createResourceIfNoneExist didn't work. I have done fixing this. Sorry for late reply. Thanks a lot!