different between the patient listing
# support
p
what is the difference between the patient listed under https://domain/admin/patients and the patient listed under https://domaiin/Patient?_count=20&_fields=id,_lastUpdated,name,birthDate,gender&_offset=0&_sort=-_lastUpdated and how can we move the patient from domain/patient to admin.patients
r
@prashant_react, the patients listed in domain/Patient are limited to the resources available in the system. However, patients listed at domain/admin/patients are those with projectMembership and user associations, granting them the ability to log in. If you wish to list all patients at domain/admin/patients, you'll need to create projectMembership for each patient along with user associations. A handy tip: If you use the startNewPatient method, it will automatically create a patient, projectMembership, and user, eliminating the need for manual setup.
r
Thanks @ravindratc , that's right. We're sorry, the UI is a bit confusing. But the patients on the admin page are the subset of
Patient
records that have a user associated with them. See this guide for more info on profile resources (https://www.medplum.com/docs/auth/user-management-guide)
p
Thanks @ravindratc got it... My use case was i was trying to create a patient for a related person by using createresource , so it was being create in /patient.. but when i tried to search the resource through the identifier that i have provided in the patient resource that the logged in user created i am not being able to find it... Is it because of the membership...or we should be able to find that specific resource by identifier
Thanks @rahul1 got it
r
@prashant_react This might because of the AccessPolicy you have assigned. Could you please share your access policy and the method you are using the search resource?
p
ummhmm , medplum.searchResources('Patient',{identifie:identifier_value});
and access policy "accessPolicy": { "resourceType": "AccessPolicy", "resource": [ { "resourceType": "Patient" }, { "resourceType": "Observation" }, { "resourceType": "DiagnosticReport" }, { "resourceType": "MedicationRequest" }, { "resourceType": "Immunization" }, { "resourceType": "Communication" }, { "resourceType": "Binary" }, { "resourceType": "DocumentReference" }, { "resourceType": "RelatedPerson" }, { "resourceType": "Media" } ], "ipAccessRule": [] },
r
Hi @prashant_react, Your access policy is configured to allow access to the specified resources, so it shouldn't restrict anything. And You're using the correct method. I've implemented FHIR Search queries in my codebase, and they've been working well. You might want to try using FHIR Search queries as well. Could you provide the output or any error messages you're encountering? Refer to the FHIR Search documentation for more details: [FHIR Search Documentation](https://www.hl7.org/fhir/search.html#combining).
p
Thanks @ravindratc i will look into it