Stream: implementers
Topic: Typescript Package
Abhijit Pattanaik (Feb 09 2021 at 05:57):
Hello everyone, I just started working on FHIR, and I am looking around for a typescript package to convert raw messages to json format confirming with the FIHR standards. Would really appreciate any guidance / pointers. Thanks in advance!!
Richard Townley-O'Neill (Feb 09 2021 at 06:39):
How are the raw messages formatted? XML?
Kevin Mayfield (Feb 09 2021 at 06:49):
I'm not aware of one. I've used an external service to do the conversions (e.g. hapi)
Abhijit Pattanaik (Feb 09 2021 at 16:04):
@Richard Townley-O'Neill Thank you for getting back!! Yes, it's a flat json with patient data.
Yunwei Wang (Feb 09 2021 at 16:05):
I remember there is one from github that I used two years ago.
Abhijit Pattanaik (Feb 09 2021 at 16:08):
Kevin Mayfield said:
I'm not aware of one. I've used an external service to do the conversions (e.g. hapi)
Thank you for your response!! Yes, that's what I thought . Do you have a sample on Git / online?
Abhijit Pattanaik (Feb 09 2021 at 16:09):
Yunwei Wang said:
I remember there is one from github that I used two years ago.
Thank you!! Do you have the link by any chance? I would really appreciate it :)
Yunwei Wang (Feb 09 2021 at 16:35):
Search "typescript fhir" in github will give you bunch of them. I cannot remember which one I used.
Josh Mandel (Feb 09 2021 at 16:35):
Yes, it's a flat json with patient data.
Do you mean it's FHIR-formatted JSON data, and you want to parse it into Typescript models in-memory?
Abhijit Pattanaik (Feb 09 2021 at 16:46):
Yunwei Wang said:
Search "typescript fhir" in github will give you bunch of them. I cannot remember which one I used.
Thank you!! Will do.
Abhijit Pattanaik (Feb 09 2021 at 16:47):
Josh Mandel said:
Yes, it's a flat json with patient data.
Do you mean it's FHIR-formatted JSON data, and you want to parse it into Typescript models in-memory?
Apologies for the confusion. No, it's just a regular json, and I need to convert it into FHIR-formatted JSON data.
Chris Moesel (Feb 09 2021 at 16:50):
@Abhijit Pattanaik -- what is "regular json" though? How is the data formatted? How do the types and fields in your JSON map to the resources and elements in FHIR? The way the data is represented in your source JSON greatly affects how you would convert it to valid FHIR JSON.
Chris Moesel (Feb 09 2021 at 16:52):
If you're saying that you will write the code to do that mapping yourself, and you just need the TypeScript types that represent valid FHIR resources, and you will do the work of actually populating the types w/ data, then I think one of the existing TypeScript FHIR libraries should get you there.
Last updated: Apr 12 2022 at 19:14 UTC