vladyslav3394
01/19/2024, 4:10 PM{
"resourceType": "AccessPolicy",
"name": "admin_patient_access_policy",
"id": "ca8a5fb7-54e3-4abd-8677-556dae4bac8e",
"compartment": {
"reference": "%patient"
},
"resource": [
{
"resourceType": "Organization",
"criteria": "Organization?_id=%provider_organization",
"readonly": false
}
]
}
I also added "access" to membership of the user
"access": [
{
"policy": {
"reference": "AccessPolicy/ca8a5fb7-54e3-4abd-8677-556dae4bac8e"
},
"parameter": [
{
"name": "provider_organization",
"valueReference": {
"reference": "Organization/c2c24e98-6df0-469c-961b-e352913aea2f"
}
}
]
}
]
It's working perfectly for GET operation, but for PUT it gives 403 forbidden error (Im using low level api)
( Readonly is false by default, also I tried with "readonly":false )
UPDATE
Type of the parameter is valueReference in "access". It should have been replaced with string. It resolved issues👍
"access": [
{
"policy": {
"reference": "AccessPolicy/ca8a5fb7-54e3-4abd-8677-556dae4bac8e"
},
"parameter": [
{
"name": "provider_organization",
"valueString": "c2c24e98-6df0-469c-961b-e352913aea2f"
}
]
}
]