Initial Commit

This commit is contained in:
2025-02-09 14:53:16 -06:00
parent a1e6d06669
commit 2743a1c042
5 changed files with 206 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
(async () => {
try {
const token = await fhirInterface().getToken();
let config = {
method: "get",
url: `${fhirSettings.base_url}/DSTU2/Patient/${fhirSettings.patient_id}`,
headers: {
Accept: "application/json",
Authorization: `${token.token_type} ${token.access_token}`,
},
};
const result = await axios(config);
res.json(result.data);
} catch (err) {
if (err.response) {
res.status(err.response.status).json(err.response.data);
} else {
res.status(400).json(JSON.stringify(err));
}
}
})();