codejenn
09/28/2023, 11:19 PMreshma
09/29/2023, 2:23 AMcodejenn
10/02/2023, 3:10 PMreshma
10/02/2023, 3:43 PMreshma
10/02/2023, 4:15 PMcodejenn
10/02/2023, 7:04 PMcodejenn
10/02/2023, 8:01 PMcody
10/02/2023, 8:30 PMMedplumClient, that the app is creating new instances of the client.
The most direct ways to fix:
1. If using MedplumClient, try to reuse a single instance to preserve auth state
2. Use client credentials flow, and cache and reuse the access token. (i.e., await medplum.startClientLogin(clientId, clientSecret), and medplum.getAccessToken())
3. Use basic auth, which does not hit rate limited endpoints (i.e., medplum.setBasicAuth(clientId, clientSecret)
> It doesn't like my custom identifiers
Hm, it looks like twilioddt is ending up as a URL query string key rather than a value
the URL should be something like Encounter?identifier=MY_VALUE
If using the MedplumClient search methods, you can either:
1. Pass that in as a string: medplum.search('Encounter', 'identifier=MY_VALUE');
2. Or pass it in as an object: medplum.search('Encounter', {identifier: MY_VALUE });
Feel free to reach out if you'd like a more detailed response on any of this!codejenn
10/02/2023, 8:33 PM