Stream: javascript
Topic: typescript / angular
Oliver Egger (Nov 24 2017 at 12:29):
Hi. I'm looking to use fhir.js in a node / typescript / angular (not angularjs) environment, but failing consistently .... has anybody any hints or tips? I tried the ng-fhir-example (https://github.com/bunyaminsg/ng-fhir-example), however i doest not work with the current angular version (https://github.com/bunyaminsg/ng-fhir-example/issues/1).
Oliver Egger (Jan 24 2018 at 22:05):
after diving deeper into angular and typescript i created an angular module for fhir.js. It uses HttpClient from @angular/common/http as a http adapter and provides a typescript interface to the fhir.js interface. See ng-fhirjs and a sample angular app. Comments welcome, i will also attend the hl7 wgm & fhir connectathon if you want to exchange your typescript experiences.
Malgorzata Schwab (Feb 02 2018 at 01:00):
Hello "typescript stream"! I am wondering if anyone tackled the object model for Element and Extension? It is a recursive relationship, and Typescript is not happy about it
Abbie Watson (Feb 03 2018 at 14:59):
It's been on our radar. There's been general work on the problem of circular dependencies in the object model with the schema validators. There was an update JSON Schema library published during the working group session this past week, with updated $ref statements and $ids, with some reported success that validators are parsing the schemas in both .Net and Javascript. I'm working on publishing them to NPM now. And we can also look at updating the Typescript definitions. We may simply need to add removal of the circular dependencies for the Typescript defs as a step to the tooling publication pipeline.
Oliver Egger (Feb 04 2018 at 07:24):
Hi @Malgorzata Schwab , did you already have a look at the fhir type definitions? They have an Interface Description for Element/Extension, see an example, up on this I think an object model could be built.
Malgorzata Schwab (Feb 06 2018 at 07:57):
Thank you, Abigail! Not sure if the update you are referring to is what Oliver described below?
Malgorzata Schwab (Feb 06 2018 at 08:00):
Oliver - I only looked at it based on your comment, thank you! Interfaces are initialized lazily, I think, so it should work indeed. Now trying to understand how to connect the dots between this and Abigail's comment - is this the same update?
Oliver Egger (Feb 06 2018 at 16:04):
As far as I can tell the update of the json schema will target R4, the type definitions are for R3 (and they will need to be updated). Where and in wich version (R3, R4?) did you encounter a problem with the object model in typescript/angular @Malgorzata Schwab ?
Malgorzata Schwab (Feb 16 2018 at 01:59):
So far we struggled with Element and Extension, but any circular type definition is puzzling. A DomainResource, for instance, is composed of other Resources (abstract class) and the only way to make it work in Oracle Objects is to turn it into a REF (reference)
Last updated: Apr 12 2022 at 19:14 UTC