zainaltaf
03/17/2025, 10:35 AM{
"resourceType": "AccessPolicy",
"name": "PatientSelfAccessPolicy",
"compartment": {
"reference": "Patient/{{patientId}}"
},
"resource": [
{
"resourceType": "Patient",
"criteria": "Patient?_id={{patientId}}"
},
{
"resourceType": "MedicationRequest",
"criteria": "MedicationRequest?subject=Patient/{{patientId}}"
},
{
"resourceType": "Basic",
"criteria": "Basic?subject=Patient/{{patientId}}"
},
{
"resourceType": "Condition",
"criteria": "Condition?subject=Patient/{{patientId}}"
}
],
"id": "(id)",
"meta": {
"project": "(project id)",
"compartment": [
{
"reference": "Project/(medplum project id)"
}
],
"versionId": "version id",
"lastUpdated": "2025-03-15T08:21:53.163Z",
"author": {
"reference": "Practitioner/(# kept secret here)",
"display": "Zain"
}
}
}
Following the docs on open patient registration and access I set the projects default patient access policy to this newly created policy. However, even after I did that, it seems that I still can't save the condition resource. I also tried following the docs that said to write the criteria in the following format for example: "criteria": "Condition?_?_compartment=%patient".zainaltaf
03/17/2025, 10:37 AMzainaltaf
03/17/2025, 10:46 AMzainaltaf
03/17/2025, 9:58 PMcody
03/18/2025, 2:38 AMAccessPolicy that shows how you're using the %patient variables?zainaltaf
03/18/2025, 2:39 AMzainaltaf
03/18/2025, 2:39 AMzainaltaf
03/18/2025, 2:39 AMrahul1
03/18/2025, 3:27 AM/fhir/R4/Condition url).
If using fake data, a screenshot would also be very helpful for debugging.zainaltaf
03/18/2025, 3:41 AMzainaltaf
03/18/2025, 3:42 AMzainaltaf
03/19/2025, 11:31 PMrahul1
03/25/2025, 6:17 PMzainaltaf
03/25/2025, 11:03 PMzainaltaf
03/25/2025, 11:04 PM