-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subject Namespace #1058
Comments
We are getting a lot of issue requests and for that, we set up some issue types which guide you through detailing an issue and help us with all the information needed so we can prioritize it. You can read more about how to contribute in our Contributing page. Please use one of the provided templates to detail the issue. |
This comment was marked as duplicate.
This comment was marked as duplicate.
Hello @simonFuturePerfect, Question: What is the expected one? I would go with what I see in the specifications (both cases can find the full URL https://fhir.nhs.uk.id/nhs-number in namespace, including dot). Please let me know, so I can report bug for that, because currently, I see this regex [a-zA-Z][a-zA-Z0-9-_:/&+?]* in ValidationServiceImp.java and that one is not able to see the dot. CC: @vidi42 , @birgerhaarbrandt, @stefanspiska, @HolgerReiseVSys |
I agree with you @vladislavploaia go with the one that is in the specification. I just added the '.' to the RegExpression in ValidationServiceImp.java. Thanks for the help. |
@simonFuturePerfect, |
Environment information
EHRBASE_VERSION: 0.22.0-SNAPSHOT
Java Runtime version: Open JDK 11.0.16
OS Version: Debian GNU/Linux 9
Archie version: 2.0.1
PostgreSQL version:11 (Azure PostgreSQL)
Steps to reproduce
curl -X 'PUT'
'https://anapplication.azurewebsites.net/ehrbase/rest/openehr/v1/ehr/f56175ac-0e72-4b7b-9088-233652444371'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-d '{
"_type": "EHR_STATUS",
"name": {
"_type": "DV_TEXT",
"value": "EHR Status"
},
"subject": {
"_type": "PARTY_SELF",
"external_ref": {
"_type": "PARTY_REF",
"type": "PERSON",
"id": {
"_type": "GENERIC_ID",
"value": "9044258125",
"scheme": "id_scheme"
},
"namespace": "https://fhir.nhs.uk.Id/nhs-number"
}
},
"is_queryable": true,
"is_modifiable": true,
"archetype_node_id": "openEHR-EHR-EHR_STATUS.generic.v1"
}'
Actual result
Error Status Code 400 Bad Request
{
"error": "Bad Request",
"message": "Subject's namespace format invalid"
}
Expected result
200 EHrId Created
Further information
I think the RegEx in
ValidationServiceImp needs to include the '.' character so it should be
private static final Pattern NAMESPACE_PATTERN = Pattern.compile("[a-zA-Z][a-zA-Z0-9-_:/&+?.]*");
I'm happy to create a unit test that emulates the openEHR subject namespace requirements, if it helps.
The text was updated successfully, but these errors were encountered: