Skip to content

Commit

Permalink
#452 added library elements title and description for refresh generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna committed Jul 26, 2023
1 parent 97069de commit f8e1c4f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import org.apache.commons.io.FilenameUtils;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.r4b.model.Enumerations;
import org.hl7.fhir.r5.model.CodeableConcept;
import org.hl7.fhir.r5.model.Coding;
import org.hl7.fhir.r5.model.Attachment;
Expand Down Expand Up @@ -212,6 +213,8 @@ private List<Library> internalRefreshGeneratedContent(List<Library> sourceLibrar
if (existingLibrary == null) {
Library newLibrary = new Library();
newLibrary.setName(fileInfo.getIdentifier().getId());
newLibrary.setTitle((newLibrary.getName()));
newLibrary.setDescription(String.format("%s: %s", Enumerations.ResourceTypeEnum.LIBRARY.getDisplay(), newLibrary.getTitle()));
newLibrary.setVersion(fileInfo.getIdentifier().getVersion());
newLibrary.setUrl(String.format("%s/Library/%s", (newLibrary.getName().equals("FHIRHelpers") ? "http://hl7.org/fhir" : canonicalBase), fileInfo.getIdentifier().getId()));
newLibrary.setId(newLibrary.getName() + (versioned ? "-" + newLibrary.getVersion() : ""));
Expand Down

0 comments on commit f8e1c4f

Please sign in to comment.