File tree Expand file tree Collapse file tree
examples/typescript-sql-on-fhir Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { APIBuilder } from "../../src/api/builder" ;
2+
3+ const builder = new APIBuilder ( )
4+ . verbose ( )
5+ . throwException ( )
6+ . typescript ( { withDebugComment : false , generateProfile : false } )
7+ . fromPackageRef ( "https://build.fhir.org/ig/FHIR/sql-on-fhir-v2//package.tgz" )
8+ . outputTo ( "./examples/typescript-sql-on-fhir/fhir-types" )
9+ // .writeTypeTree("./src/fhir-types/tree.yaml")
10+ . treeShake ( {
11+ // "hl7.fhir.r5.core": {"http://hl7.org/fhir/StructureDefinition/Meta": {}},
12+ "org.sql-on-fhir.ig" : {
13+ "https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition" : { } ,
14+ } ,
15+ } )
16+ . cleanOutput ( true ) ;
17+
18+ const report = await builder . generate ( ) ;
19+
20+ console . log ( report ) ;
21+
22+ if ( report . success ) {
23+ console . log ( "✅ FHIR types generated successfully!" ) ;
24+ } else {
25+ console . error ( "❌ FHIR types generation failed." ) ;
26+ process . exit ( 1 ) ;
27+ }
You can’t perform that action at this time.
0 commit comments