Allow uncertainty arguments for various type casting operations
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- backend
Direzione di ricerca
Inizia esaminando il comportamento del traduttore CQL-to-ELM che inserisce chiamate a ToDecimal con incertezze, quindi confronta i casi elencati di ToBoolean, ToDate, ToDateTime, ToQuantity e ToInteger con la specifica. Il lavoro è completato quando le conversioni supportate e il relativo comportamento con le incertezze sono definiti e verificati, senza estendere ToString.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This is an interesting one. Looking at the spec, ToDecimal only accepts a Boolean or a String, neither of which can be expressed as an uncertainty. But I see that the test cases you created cause the CQL-to-ELM translator to automatically insert a ToDecimal call, passing in an uncertainty -- so it seems the translator may invoke things technically not in the spec!
I guess we probably should support something like this for some of the other ToXXX functions, particularly those that can take an argument that can be represented by an Uncertainty. That would be:
ToBoolean(argument Decimal) Boolean
ToBoolean(argument Integer) Boolean
ToDate(argument DateTime) Date
ToDateTime(argument Date) DateTime
ToQuantity(argument Decimal) Quantity
ToQuantity(argument Integer) Quantity
I think I would also add ToInteger, because I think the translator maybe would use something like that to try to convert a Decimal to an Integer.
I left toString off the list because the spec does not define how to translate and uncertainty to a String and it also says that the string must be "round-trippable" back to its original type.
All the said, I think it's outside the scope of this task. So I'd suggest we create another bug to track it.
Originally posted by @cmoesel in https://github.com/cqframework/cql-execution/pull/222#discussion_r577873597
- Lingua principale
- JavaScript
- Stelle
- 84
- Fork
- 41
- Merge medio
- 5g 4h
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cqframework/cql-execution
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
cqframework/cql-execution#400 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 50/100
cqframework/cql-execution#399 · 3 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
cqframework/cql-execution#398 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
cqframework/cql-execution#397 ·
-
Issue with using type testing operation on FHIR primitivesForse già presa @dehall l’ha presa 15 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 54/100
cqframework/cql-execution#391 · 2 commenti · 1 assegnatario ·
Tutte le issue di cqframework/cql-execution
Issue simili
-
🐛 bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
LibreChat-AI/LibreChat#17887 ·
I maintainer di solito rispondono entro 1 giorno
-
Step-by-step Ash GuideAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
liveshowy/webauthn_components#118 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
showdownjs/showdown#1113 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
dependents/node-precinct#167 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
volumio/volumio-plugins-sources-bookworm#279 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno