The error is saying that the left of your expression is a CovidPatients while the right part is giving a string. But you appear to want to limit that dataserie to the currentobject, so you want an object. You get a string because you are missing the braces in the expression. Change it to
and your chart will be fine.
Do you mean you need to pass a boolean into the XPath?
If you do, use true() or false(). For example...
[MyFirstModule.CovidPatients_Hospital = false()]
However, looking at the error message it looks like you actually need to pass a CovidPatients entity to your XPath. If you have the CovidPatients entity already in a variable (let’s say as $CovidPatient), just pass it into the XPath like this.
[MyFirstModule.CovidPatients_Hospital = $CovidPatient]
Hope this helps.