File tree Expand file tree Collapse file tree
tooling/src/main/java/org/opencds/cqf/tooling Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,7 +236,6 @@ protected Library refreshGeneratedContent(Library sourceLibrary) {
236236 var translatorOptions = getCqlProcessor ().getCqlTranslatorOptions ();
237237 var formats = translatorOptions .getFormats ();
238238 CqlProcessor .CqlSourceFileInformation info = getCqlProcessor ().getFileInformation (attachment .getUrl ());
239- attachment .setUrlElement (null );
240239 if (info != null ) {
241240 if (info .getElm () != null && emptyIfNull (formats ).contains (Format .XML )) {
242241 sourceLibrary .addContent ().setContentType ("application/elm+xml" ).setData (info .getElm ());
@@ -380,7 +379,9 @@ private Attachment loadFile(String fn) throws IOException {
380379 Attachment att = new Attachment ();
381380 att .setContentType ("text/cql" );
382381 att .setData (TextFile .fileToBytes (f ));
383- att .setUrl (f .getAbsolutePath ());
382+ if (this .parentContext != null && this .parentContext .getCanonicalBase () != null ) {
383+ att .setUrl (this .parentContext .getCanonicalBase () + "/Library-" + f .getName ());
384+ }
384385 return att ;
385386 }
386387 }
Original file line number Diff line number Diff line change @@ -200,6 +200,10 @@ public void execute() throws FHIRException {
200200 * @return
201201 */
202202 public CqlSourceFileInformation getFileInformation (String filename ) {
203+ if (filename == null ) {
204+ return null ;
205+ }
206+
203207 if (fileMap == null ) {
204208 throw new IllegalStateException ("CQL File map is not available, execute has not been called" );
205209 }
You can’t perform that action at this time.
0 commit comments