Stream: conformance
Topic: Forge Question
Grahame Grieve (Jun 08 2016 at 00:20):
@Michel Rutten - how does Forge load the content models of the resources? If I generated DSTU2 structure definitions for DSTU3 resources, could we make it so you could use Forge to profile DSTU3 resources? (until you update Forge properly to DSTU3)
Lloyd McKenzie (Jun 08 2016 at 02:50):
I've done this. However, it only works for resources that existed in STU 2. For example, Forge won't support the Task resource, even if expressed in DSTU 2 syntax. Same issue with any of the new data types or any resources that reference them (e.g. the CDS resources that now reference the "meta" data type)
Lloyd McKenzie (Jun 08 2016 at 02:51):
The content is loaded from the validation.xml.zip file located in the same directory as the Forge executable. However, the Forge executable is *hard* to locate. Particularly if you've got multiple installs of forge due to upgrades of the tool. (I had to use a search tool that could search inside hidden folders and manually rename all of my forge.exe files until I found the right one.) Happy to share my customized validation zip file if that's useful.
Grahame Grieve (Jun 08 2016 at 04:47):
well we need to make this easier
Grahame Grieve (Jun 08 2016 at 04:48):
Also, @Michel Rutten , how do I setup forge to work when I open as in explorer?
Grahame Grieve (Jun 08 2016 at 05:16):
And another forge question - editing a logical model. I define all the content of a logical model in the snapshot. Forge opened it, but saved it in the differential.
Grahame Grieve (Jun 08 2016 at 05:23):
... and we need to talk about example values
Michel Rutten (Jun 08 2016 at 09:21):
As Lloyd explains, Forge loads content models from the contents of validation.zip in the application directory. The ClickOnce installer puts the application files into some well hidden folder that is hard to find. If you start Forge, you can use the task manager to open the executable folder. Also the Options menu provides a command "Open FHIR Artifact cache folder", this will open an explorer window on the folder where the FHIR .NET API extracts the contents of validation.zip. Forge specifically processes profiles-resources.xml and profiles-types.xml (extracted from validation.zip) to generate the models. So you could hack these XML files in-place in order to modify the Forge models. However because of some limitations in the current .NET FHIR API library version, you cannot define custom resource/data types; this wil cause deserialization to fail. We are currently working on an updated, more flexible API design that will allow us to support this.
[Edit] I'm interesting in feedback on this. If you manage to get this working, maybe we can publish the custom STU3-on-DSTU2 validation.zip somewhere, along with some guidance on how to install this.
Michel Rutten (Jun 08 2016 at 09:32):
Concerning Forge integration with Windows Explorer, I've thought about this before, but never got around to implementing it. The easiest approach would be to define and register a custom file extension with the application, e.g. ".fhir". However I don't think this is very practical, as most resources are persisted as ".xml" or ".json" files. Alternatively I could try and register the application as a handler for the generic ".xml" extension, but then the user has to take care to open actual FHIR profiles - other types of XML files are not supported and would generate an error. It is possible to develop and register a binary file type handler component into Explorer that dynamically inspects the selected file, but this is probably not worth the effort. I'm interested in feedback on this. If we can decide on a useful approach then I'm happy to implement it.
Michel Rutten (Jun 08 2016 at 09:35):
Support for logical models is still in it's infancy. When implementing this, I simply leveraged the existing functionality in Forge. So the serialization uses the same existing logic that we've implemented to save regular profiles - generating a differential. I'll see if I can make the serialization a bit smarter, so logical models are serialized to a snapshot instead of a differential component.
Michel Rutten (Jun 08 2016 at 09:37):
As far as example resources, you can include them in a package and Forge will try to load them. However you can only edit the common Resource meta properties and see a read-only XML rendering.
Michel Rutten (Jun 08 2016 at 14:02):
@Grahame Grieve I fixed the serialization of logical models in the development build. The next release of Forge will serialize logical models to a snapshot component (not a differential). Also it will automatically fix logical models created by the previous version by transfering element definitions from the differential to the snapshot component. The next release will contain a lot of small bugfixes and will be published soon (aiming for this friday). Thanks for the feedback!
Grahame Grieve (Jun 08 2016 at 22:05):
with regard to integration with explorer, providing a 'copy executable name' would be great - since the binary is stored in some weird hard to find place. Open with can take it from there.
Grahame Grieve (Jun 08 2016 at 22:05):
thanks for fixing the logical models
Grahame Grieve (Jun 08 2016 at 22:06):
with regard to replacing the profiles bundles, the issue is the enumerations, right?
Grahame Grieve (Jun 08 2016 at 22:11):
The issue with examples is that in the spreadsheet, I've defined an extension for multiple example columns so that I can build multiple examples out of the spreadsheet
Grahame Grieve (Jun 08 2016 at 22:11):
now we have to migrate to Forge...
Grahame Grieve (Jun 08 2016 at 23:01):
you know what I'd love? A new view, a grid that has elements down the left, and then a column for each mapping defined in mappingspaces.xml. And another grid view for examples, a column for examples 1..10 or something.
Lloyd McKenzie (Jun 09 2016 at 06:59):
Open FHIR Artifact cache folder makes me nervous because it's not clear if the cache will reliably persist.
Lloyd McKenzie (Jun 09 2016 at 07:01):
Is there a reason the mappings and examples need to be separate from the existing grid? I like that you can switch the columns around so you can choose what you want to look at on one screen. And I think it would be useful to look at things like cardinality or must support when looking at mappings or examples
Michel Rutten (Jun 09 2016 at 07:59):
@Grahame Grieve & @Lloyd McKenzie Thanks for the useful feedback!
I'll implement a command to open the application (executable) directory, no biggie.
The current version of the .NET FHIR API is very strict on enumerations; even a single invalid enum value will cause deserialization to fail. Ewout has already implemented a more flexible approach in the development branch of the API. Once we update Forge to this new API version, the application should become more forgiving in handling unknown values.
Support for examples is still quite primitive. I'm open for suggestions on how to improve this. Interesting proposal for a new "example view". So if I understand correctly, this view would represent a specific extension on StructureDefinition for association with a set of example resources? That sounds quite useful. Do you know where I can find the extension definition?
Also interesting suggestions about a special view for mappingspaces.xml. I'm not familiar with that file, but I'll definitely investigate.
The FHIR Artifact cache folder is bound to a specific version of the API. If you clear the cache folder, the API will simply re-extract validation.zip. So if you replace validation.zip in the application directory and clear the cache folder, then you should be good to go. But I consider this a hack for power users.
Michel Rutten (Jun 09 2016 at 08:05):
FYI I'm currently wrapping up a new minor update with a lot of bugfixes and small functional improvements. I'm planning to publish the update tomorrow. The minor update will still remain at the current version of the API. After that, I'm going to work on updating Forge to the new API version that is more flexible with deserialization.
Grahame Grieve (Jun 09 2016 at 10:04):
so we're about to have a lot of users using forge with the current build
Grahame Grieve (Jun 09 2016 at 10:05):
it would be good if we could make some minor adjustments so that this wasn't a power user thing
Grahame Grieve (Jun 09 2016 at 10:05):
and it will take the pressure of you to upgrade to stu3 - which otherwise will be considerable
Grahame Grieve (Jun 09 2016 at 10:06):
I proposed other views because a view with too many columns becomes unmanageable...
Michel Rutten (Jun 09 2016 at 11:10):
Agreed, that would definitely be helpful. I will integrate a new Open Application Folder command into the new release, as requested. Also I'll see if I can come up with a more user friendly solution to provide in a future release. @Lloyd McKenzie could you please send me that custom STU3-on-DSTU2 validation.zip file, so I can evaluate the procedure?
As for the alternate views, could you describe how you'd like the grids to be formatted? You mention one column per mapping/example. So what would be visible in each grid cell? I assume you'd want the cells to be editable. For the related examples, I could implement a url textbox with a file selector or such. But mapping is a bit harder, as these are complex components.
Grahame Grieve (Jun 09 2016 at 11:12):
what I imagined:
mapping - one editable string column per entry in mappingSpaces.xml
examples - one editable string column per # of examples added
Grahame Grieve (Jun 09 2016 at 11:13):
the way examples work is that they contain a json fragment for that element for the example. Obviously some examples can't be built that way, but many can
Michel Rutten (Jun 09 2016 at 11:19):
I'm looking at mappingSpaces.xml (from SVN), interesting. I could integrate these into Forge, e.g. to provide drop-down options. The file is not part of validation.zip however.
Michel Rutten (Jun 09 2016 at 11:21):
I think I'm starting to understand. So the string field in the mapping grid would represent the mapping code for the system of the containing column? That would work.
Michel Rutten (Jun 09 2016 at 11:22):
And for the example grid, Forge would persist the JSON example fragments per element via an extension on ElementDefinition?
Grahame Grieve (Jun 09 2016 at 11:23):
yeah. I can publish the mappingSpaces.xml somewhere if it helps. You'd know which column matched which entry in the mapping spaces, so you'd know how to propulate StructureDefinition.mapping, and the value the user entered - if they did - would go in ElementDefinition.mapping.map
Grahame Grieve (Jun 09 2016 at 11:24):
I think in this use, you'd just leave ElementDefinition.mapping.language blank
Grahame Grieve (Jun 09 2016 at 11:24):
examples - yes. and then the publisher would pull them out and populate an actual example.
Grahame Grieve (Jun 09 2016 at 11:27):
for the extension, the url is "http://hl7.org/fhir/StructureDefinition/structuredefinition-example", and it has 2 contained extensions, "index" which is an integer, and tells you the column, and "exValue" which is the value. You need only support string, and the publisher will interpret it
Michel Rutten (Jun 09 2016 at 11:31):
I could manually include mappingSpaces.xml. I now got the current version of the file from SVN. Where can I find the official DSTU2 version?
Grahame Grieve (Jun 09 2016 at 11:32):
well, just use the current one, actually
Michel Rutten (Jun 09 2016 at 11:32):
OK
Grahame Grieve (Jun 09 2016 at 11:32):
it's not version dependent
Michel Rutten (Jun 09 2016 at 11:32):
Got it
Grahame Grieve (Jun 09 2016 at 11:32):
thanks
Michel Rutten (Jun 09 2016 at 11:33):
For mapping.language, users can still edit this property via the element tree if necessary.
Michel Rutten (Jun 09 2016 at 11:33):
Thx for the extension link!
Grahame Grieve (Jun 09 2016 at 11:54):
np
Lloyd McKenzie (Jun 09 2016 at 13:26):
@Michel Rutten For fully-defined examples (and for Conformance instances too), just something that shows the metadata and lets you launch the instance in your system editor would be reasonable. Eventually maybe a tie-in to ClinFHIR? (And a different icon than the "I don't know what this is" would be good too :>) I'll send you my custom validation.zip file.
Grahame Grieve (Jun 10 2016 at 06:52):
@Michel Rutten - when the build starts working again (path problems) then the current build will publish a set of DSTU2 profiles for forge
Michel Rutten (Jun 10 2016 at 08:39):
@Lloyd McKenzie I'll try and find/create a better icon for example resources. Also I'll see if I can implement a "Open in external editor" command. ClinFHIR integration is a great suggestion! I'll discuss all your input with our team.
@Grahame Grieve thanks! Can I fetch the DSTU2 profiles from somewhere, or do I have to run the build myself?
Grahame Grieve (Jun 10 2016 at 09:38):
you'll be able to download from the current build once one of us figures out the build path problem
Michel Rutten (Jun 10 2016 at 10:05):
OK, no rush. FYI I've implemented new application commands:
- Open the application folder (i.e. source location of validation.zip)
- Open selected resource in External Application (e.g. Notepad++, also works for example resources etc.)
Grahame Grieve (Jun 10 2016 at 10:05):
love it, thanks
Grahame Grieve (Jun 10 2016 at 20:16):
@Michel Rutten see reorged downloads at http://hl7-fhir.github.io/downloads.html - 3rd link is a current build in as DSTU2 conformance resources
Grahame Grieve (Aug 21 2017 at 12:34):
@Michel Rutten - a forge question. If I wanted to launch Forge from another application, what's the most reliable to launch it - and to point it at a resource, either as a file or (ideally) on a server?
Michel Rutten (Aug 21 2017 at 12:48):
Hi @Grahame Grieve, Forge does not (yet) accept command line parameters. So you could start the application remotely, but you cannot immediately open a profile. Of course, I could add support for command line arguments in a future release.
But I don't know an easy way to determine the application location... ClickOnce installer handles this.
Grahame Grieve (Aug 21 2017 at 12:59):
or, from my point of view, ClickOnce doesn't handle this ;-)
Grahame Grieve (Aug 21 2017 at 12:59):
it would be good to handle command line parameters - you'll start getting complaints about tool integration soon....
Michel Rutten (Aug 21 2017 at 13:13):
Basically we implement new features by popular demand, prioritizing requests from commercial customers, and you're the first one asking for this.
ClickOnce is designed to allow download and installation by non-administrators. To facilitate this, ClickOnce deploys the application to a dynamic location somewhere below the user's temporary folder. However that makes it hard to locate the actual installation folder, as the location differs per machine (also dependent on the OS version).
I found a workaround online. The ClickOnce installer creates a shortcut in a fixed location in the user's start menu: "...\Start Menu\Programs\Furore\Furore FHIR Tools\Forge for HL7 FHIR STU3.appref-ms". You can determine the exact location of the current user's start menu programs folder by calling a Windows API. Then simply start/launch the shortcut.
Grahame Grieve (Aug 21 2017 at 13:23):
I understand about priorities - why I'm raising it now so you know it's coming. I'll work on that
Grahame Grieve (Aug 21 2017 at 13:24):
I'll launch it using that method
Michel Rutten (Aug 21 2017 at 13:37):
Understood. I'll add your feature request to our internal tracker.
BTW I've tried to launch programmatically via the shortcut and it works on my machine.
Grahame Grieve (Aug 21 2017 at 13:41):
k thanks
Michel Rutten (Aug 21 2017 at 14:13):
Michel Rutten (Aug 21 2017 at 14:13):
https://www.mking.io/blog/programmatically-launching-clickonce-applications
Brian Postlethwaite (Aug 25 2017 at 05:30):
Another good feature is to drag a file onto the app and open it (or onto an IG in the tree for inclusion)
Michel Rutten (Aug 25 2017 at 11:58):
Hi @Brian Postlethwaite, great suggestion! I've added a tracker item.
Mounika (Aug 29 2017 at 07:36):
Hi all, I had created a profile for SmokingUse using forge. Whenever I am validating that profile using Simplifier.Net. It's showing some warnings as shown in the screenshot. Can anyone suggest me how to resolve it
warning2.PNG
Michel Rutten (Aug 29 2017 at 09:46):
Hi @Mounika K, you can safely ignore the warnings about validation rule eld-16, as we recently discovered that the associated fhirpath expression is incorrect. I've submitted a gForge tracker issue, so this will be fixed in the standard.
The remaining warning is about an unresolved reference to a valueset. The validator requires access to all the referenced external (conformance) resources. I suggest you upload the referenced valueset to your Simplifier project and retry the profile validation.
Mounika (Aug 29 2017 at 09:54):
Okay @Michel Rutten Thank you
Mounika (Sep 06 2017 at 11:21):
(deleted)
abhishek gupta (Nov 17 2017 at 11:44):
Hi @Michel Rutten ,
When I am validating the profile in forge at that time I am getting some Exception like that:
" No slicing on the root element"
If you have idea about that then ping me.
Thanks
Last updated: Apr 12 2022 at 19:14 UTC