Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument \"options\" must not be function #148

Open
naphattharawat opened this issue Jul 15, 2023 · 2 comments
Open

Argument \"options\" must not be function #148

naphattharawat opened this issue Jul 15, 2023 · 2 comments

Comments

@naphattharawat
Copy link

http://localhost:3000/4_0_0/Patient?_count=2

{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "internal",
"details": {
"text": "Unexpected: Argument \"options\" must not be function"
}
}
]
}
@alejosv
Copy link

alejosv commented Feb 25, 2024

Same message

@simranjeet09
Copy link

@alejosv try changing the query in search function like this. I was able to run this using below code.

collection.find(query).toArray((err, data) => {
if (err) {
logger.error('Error with Patient.search: ', err);
return reject(err);
}
console.log(data);
Promise.resolve(data).then((patients) => {
patients = patients.map(element => new Patient(element));
resolve(patients);
});
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants