├── .gitignore
├── .vs
├── ProjectSettings.json
├── VSWorkspaceState.json
└── slnx.sqlite
├── FhirPathTester.sln
├── LICENSE.md
├── NuGet.Config
├── README.md
├── UWP
├── App.xaml
├── App.xaml.cs
├── Assets
│ ├── AppList
│ │ ├── AppList.scale-100.png
│ │ ├── AppList.scale-125.png
│ │ ├── AppList.scale-150.png
│ │ ├── AppList.scale-200.png
│ │ ├── AppList.scale-400.png
│ │ ├── AppList.targetsize-16.png
│ │ ├── AppList.targetsize-16_altform-unplated.png
│ │ ├── AppList.targetsize-20.png
│ │ ├── AppList.targetsize-20_altform-unplated.png
│ │ ├── AppList.targetsize-24.png
│ │ ├── AppList.targetsize-24_altform-unplated.png
│ │ ├── AppList.targetsize-256.png
│ │ ├── AppList.targetsize-256_altform-unplated.png
│ │ ├── AppList.targetsize-30.png
│ │ ├── AppList.targetsize-30_altform-unplated.png
│ │ ├── AppList.targetsize-32.png
│ │ ├── AppList.targetsize-32_altform-unplated.png
│ │ ├── AppList.targetsize-36.png
│ │ ├── AppList.targetsize-36_altform-unplated.png
│ │ ├── AppList.targetsize-40.png
│ │ ├── AppList.targetsize-40_altform-unplated.png
│ │ ├── AppList.targetsize-48.png
│ │ ├── AppList.targetsize-48_altform-unplated.png
│ │ ├── AppList.targetsize-60.png
│ │ ├── AppList.targetsize-60_altform-unplated.png
│ │ ├── AppList.targetsize-64.png
│ │ ├── AppList.targetsize-64_altform-unplated.png
│ │ ├── AppList.targetsize-72.png
│ │ ├── AppList.targetsize-72_altform-unplated.png
│ │ ├── AppList.targetsize-80.png
│ │ ├── AppList.targetsize-80_altform-unplated.png
│ │ ├── AppList.targetsize-96.png
│ │ └── AppList.targetsize-96_altform-unplated.png
│ ├── Large
│ │ ├── Large310x310Logo.scale-100.png
│ │ ├── Large310x310Logo.scale-125.png
│ │ ├── Large310x310Logo.scale-150.png
│ │ ├── Large310x310Logo.scale-200.png
│ │ └── Large310x310Logo.scale-400.png
│ ├── LargeTile.scale-100.png
│ ├── LargeTile.scale-125.png
│ ├── LargeTile.scale-150.png
│ ├── LargeTile.scale-200.png
│ ├── LargeTile.scale-400.png
│ ├── LockScreenLogo.scale-200.png
│ ├── Medium
│ │ ├── Medium150x150Logo.scale-100.png
│ │ ├── Medium150x150Logo.scale-125.png
│ │ ├── Medium150x150Logo.scale-150.png
│ │ ├── Medium150x150Logo.scale-200.png
│ │ └── Medium150x150Logo.scale-400.png
│ ├── Small
│ │ ├── Small71x71Logo.scale-100.png
│ │ ├── Small71x71Logo.scale-125.png
│ │ ├── Small71x71Logo.scale-150.png
│ │ ├── Small71x71Logo.scale-200.png
│ │ └── Small71x71Logo.scale-400.png
│ ├── SmallTile.scale-100.png
│ ├── SmallTile.scale-125.png
│ ├── SmallTile.scale-150.png
│ ├── SmallTile.scale-200.png
│ ├── SmallTile.scale-400.png
│ ├── SplashScreen.scale-100.png
│ ├── SplashScreen.scale-125.png
│ ├── SplashScreen.scale-150.png
│ ├── SplashScreen.scale-200.png
│ ├── SplashScreen.scale-400.png
│ ├── SplashScreen
│ │ ├── SplashScreen.scale-100.png
│ │ ├── SplashScreen.scale-125.png
│ │ ├── SplashScreen.scale-150.png
│ │ ├── SplashScreen.scale-200.png
│ │ └── SplashScreen.scale-400.png
│ ├── Square150x150Logo.scale-100.png
│ ├── Square150x150Logo.scale-125.png
│ ├── Square150x150Logo.scale-150.png
│ ├── Square150x150Logo.scale-200.png
│ ├── Square150x150Logo.scale-400.png
│ ├── Square44x44Logo.altform-unplated_targetsize-16.png
│ ├── Square44x44Logo.altform-unplated_targetsize-256.png
│ ├── Square44x44Logo.altform-unplated_targetsize-32.png
│ ├── Square44x44Logo.altform-unplated_targetsize-48.png
│ ├── Square44x44Logo.scale-100.png
│ ├── Square44x44Logo.scale-125.png
│ ├── Square44x44Logo.scale-150.png
│ ├── Square44x44Logo.scale-200.png
│ ├── Square44x44Logo.scale-400.png
│ ├── Square44x44Logo.targetsize-16.png
│ ├── Square44x44Logo.targetsize-24.png
│ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ ├── Square44x44Logo.targetsize-256.png
│ ├── Square44x44Logo.targetsize-32.png
│ ├── Square44x44Logo.targetsize-48.png
│ ├── Store
│ │ ├── StoreLogo.scale-100.png
│ │ ├── StoreLogo.scale-125.png
│ │ ├── StoreLogo.scale-150.png
│ │ ├── StoreLogo.scale-200.png
│ │ └── StoreLogo.scale-400.png
│ ├── StoreLogo.backup.png
│ ├── StoreLogo.scale-100.png
│ ├── StoreLogo.scale-125.png
│ ├── StoreLogo.scale-150.png
│ ├── StoreLogo.scale-200.png
│ ├── StoreLogo.scale-400.png
│ ├── Wide
│ │ ├── Wide310x150Logo.scale-100.png
│ │ ├── Wide310x150Logo.scale-125.png
│ │ ├── Wide310x150Logo.scale-150.png
│ │ ├── Wide310x150Logo.scale-200.png
│ │ └── Wide310x150Logo.scale-400.png
│ ├── Wide310x150Logo.scale-100.png
│ ├── Wide310x150Logo.scale-125.png
│ ├── Wide310x150Logo.scale-150.png
│ ├── Wide310x150Logo.scale-200.png
│ ├── Wide310x150Logo.scale-400.png
│ ├── fhir-lab-ico-300x300.png
│ └── fhir-lab.png
├── FhirPathTesterUWP.csproj
├── FhirPathTesterUWP.nuget.props
├── FhirPathTesterUWP.nuget.targets
├── MainPage.xaml
├── MainPage.xaml.cs
├── Package.appxmanifest
├── Properties
│ ├── AssemblyInfo.cs
│ └── Default.rd.xml
└── about.md
├── WPF
├── App.config
├── App.xaml
├── App.xaml.cs
├── CustomFluentPathFunctions.cs
├── FhirPathExpressionProcessing.cs
├── FhirPathProcessor.cs
├── FhirPathTester.csproj
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── fhir-lab-ico-300x300.ico
└── packages.config
└── contributors.md
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.sln.docstates
8 |
9 | # Build results
10 | [Dd]ebug/
11 | [Rr]elease/
12 | x64/
13 | [Bb]in/
14 | [Oo]bj/
15 | packages/
16 | *.ide
17 | working/
18 |
19 | # MSTest test Results
20 | [Tt]est[Rr]esult*/
21 | [Bb]uild[Ll]og.*
22 |
23 | *_i.c
24 | *_p.c
25 | *.ilk
26 | *.meta
27 | *.obj
28 | *.pch
29 | *.pdb
30 | *.pgc
31 | *.pgd
32 | *.rsp
33 | *.sbr
34 | *.tlb
35 | *.tli
36 | *.tlh
37 | *.tmp
38 | *.tmp_proj
39 | *.log
40 | *.vspscc
41 | *.vssscc
42 | .builds
43 | *.pidb
44 | *.log
45 | *.scc
46 |
47 | # Visual C++ cache files
48 | ipch/
49 | *.aps
50 | *.ncb
51 | *.opensdf
52 | *.sdf
53 | *.cachefile
54 |
55 | # Visual Studio profiler
56 | *.psess
57 | *.vsp
58 | *.vspx
59 |
60 | # Guidance Automation Toolkit
61 | *.gpState
62 |
63 | # ReSharper is a .NET coding add-in
64 | _ReSharper*/
65 | *.[Rr]e[Ss]harper
66 |
67 | # TeamCity is a build add-in
68 | _TeamCity*
69 |
70 | # DotCover is a Code Coverage Tool
71 | *.dotCover
72 |
73 | # NCrunch
74 | *.ncrunch*
75 | .*crunch*.local.xml
76 |
77 | # Installshield output folder
78 | [Ee]xpress/
79 |
80 | # DocProject is a documentation generator add-in
81 | DocProject/buildhelp/
82 | DocProject/Help/*.HxT
83 | DocProject/Help/*.HxC
84 | DocProject/Help/*.hhc
85 | DocProject/Help/*.hhk
86 | DocProject/Help/*.hhp
87 | DocProject/Help/Html2
88 | DocProject/Help/html
89 |
90 | # Click-Once directory
91 | publish/
92 |
93 | # Publish Web Output
94 | *.Publish.xml
95 |
96 | # NuGet Packages Directory
97 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line
98 | #packages/
99 |
100 | # Windows Azure Build Output
101 | csx
102 | *.build.csdef
103 |
104 | # Windows Store app package directory
105 | AppPackages/
106 |
107 | # Others
108 | sql/
109 | *.Cache
110 | ClientBin/
111 | [Ss]tyle[Cc]op.*
112 | ~$*
113 | *~
114 | *.dbmdl
115 | *.[Pp]ublish.xml
116 | *.pfx
117 | *.publishsettings
118 |
119 | # RIA/Silverlight projects
120 | Generated_Code/
121 |
122 | # Backup & report files from converting an old project file to a newer
123 | # Visual Studio version. Backup files are not needed, because we have git ;-)
124 | _UpgradeReport_Files/
125 | Backup*/
126 | UpgradeLog*.XML
127 | UpgradeLog*.htm
128 |
129 | # SQL Server files
130 | App_Data/*.mdf
131 | App_Data/*.ldf
132 |
133 |
134 | #LightSwitch generated files
135 | GeneratedArtifacts/
136 | _Pvt_Extensions/
137 | ModelManifest.xml
138 |
139 | # =========================
140 | # Windows detritus
141 | # =========================
142 |
143 | # Windows image file caches
144 | Thumbs.db
145 | ehthumbs.db
146 |
147 | # Folder config file
148 | Desktop.ini
149 |
150 | # Recycle Bin used on file shares
151 | $RECYCLE.BIN/
152 |
153 | # Mac desktop service store files
154 | .DS_Store
155 | /FhirApi.userprefs
156 | /src/EwoutFhirNetApi.snk
157 | *.nupkg
158 | /packages/repositories.config
159 | src/Hl7.Fhir.Api/EwoutFhirNetApi.snk
160 | src/Hl7.Fhir.Model/EwoutFhirNetApi.snk
161 | *.snk
162 | sonar-project.properties
163 | src/.vs/
164 | build/runbuild.txt
165 | /.vs/config/applicationhost.config
166 | /UWP/BundleArtifacts
167 | /UWP/_pkginfo.txt
168 | .vs/
169 | FhirPathTesterXamarin/
170 | FhirUserControls/
--------------------------------------------------------------------------------
/.vs/ProjectSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "CurrentProjectSetting": null
3 | }
--------------------------------------------------------------------------------
/.vs/VSWorkspaceState.json:
--------------------------------------------------------------------------------
1 | {
2 | "ExpandedNodes": [
3 | ""
4 | ],
5 | "PreviewInSolutionExplorer": false
6 | }
--------------------------------------------------------------------------------
/.vs/slnx.sqlite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/.vs/slnx.sqlite
--------------------------------------------------------------------------------
/FhirPathTester.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27004.2006
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FhirPathTester", "WPF\FhirPathTester.csproj", "{EB2E4288-28D4-407F-B019-CAAA763FA810}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FhirPathTesterUWP", "UWP\FhirPathTesterUWP.csproj", "{36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FhirUserControls", "FhirUserControls\FhirUserControls.csproj", "{20FCEF54-3863-4A06-BD74-013392DB2746}"
11 | EndProject
12 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1F031D9D-52AB-48BA-8A86-026709005F31}"
13 | ProjectSection(SolutionItems) = preProject
14 | contributors.md = contributors.md
15 | LICENSE.md = LICENSE.md
16 | README.md = README.md
17 | EndProjectSection
18 | EndProject
19 | Global
20 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
21 | Debug|Any CPU = Debug|Any CPU
22 | Debug|ARM = Debug|ARM
23 | Debug|x64 = Debug|x64
24 | Debug|x86 = Debug|x86
25 | Release|Any CPU = Release|Any CPU
26 | Release|ARM = Release|ARM
27 | Release|x64 = Release|x64
28 | Release|x86 = Release|x86
29 | EndGlobalSection
30 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
31 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Debug|Any CPU.Build.0 = Debug|Any CPU
33 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Debug|ARM.ActiveCfg = Debug|Any CPU
34 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Debug|ARM.Build.0 = Debug|Any CPU
35 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Debug|x64.ActiveCfg = Debug|Any CPU
36 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Debug|x64.Build.0 = Debug|Any CPU
37 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Debug|x86.ActiveCfg = Debug|Any CPU
38 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Debug|x86.Build.0 = Debug|Any CPU
39 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Release|Any CPU.ActiveCfg = Release|Any CPU
40 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Release|Any CPU.Build.0 = Release|Any CPU
41 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Release|ARM.ActiveCfg = Release|Any CPU
42 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Release|ARM.Build.0 = Release|Any CPU
43 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Release|x64.ActiveCfg = Release|Any CPU
44 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Release|x64.Build.0 = Release|Any CPU
45 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Release|x86.ActiveCfg = Release|Any CPU
46 | {EB2E4288-28D4-407F-B019-CAAA763FA810}.Release|x86.Build.0 = Release|Any CPU
47 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Debug|Any CPU.ActiveCfg = Debug|x64
48 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Debug|Any CPU.Build.0 = Debug|x64
49 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Debug|Any CPU.Deploy.0 = Debug|x64
50 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Debug|ARM.ActiveCfg = Debug|ARM
51 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Debug|ARM.Build.0 = Debug|ARM
52 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Debug|ARM.Deploy.0 = Debug|ARM
53 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Debug|x64.ActiveCfg = Debug|x64
54 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Debug|x64.Build.0 = Debug|x64
55 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Debug|x64.Deploy.0 = Debug|x64
56 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Debug|x86.ActiveCfg = Debug|x86
57 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Debug|x86.Build.0 = Debug|x86
58 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Debug|x86.Deploy.0 = Debug|x86
59 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Release|Any CPU.ActiveCfg = Release|x86
60 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Release|ARM.ActiveCfg = Release|ARM
61 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Release|ARM.Build.0 = Release|ARM
62 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Release|ARM.Deploy.0 = Release|ARM
63 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Release|x64.ActiveCfg = Release|x64
64 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Release|x64.Build.0 = Release|x64
65 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Release|x64.Deploy.0 = Release|x64
66 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Release|x86.ActiveCfg = Release|x86
67 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Release|x86.Build.0 = Release|x86
68 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}.Release|x86.Deploy.0 = Release|x86
69 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
70 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Debug|Any CPU.Build.0 = Debug|Any CPU
71 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Debug|ARM.ActiveCfg = Debug|ARM
72 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Debug|ARM.Build.0 = Debug|ARM
73 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Debug|x64.ActiveCfg = Debug|x64
74 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Debug|x64.Build.0 = Debug|x64
75 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Debug|x86.ActiveCfg = Debug|x86
76 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Debug|x86.Build.0 = Debug|x86
77 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Release|Any CPU.ActiveCfg = Release|Any CPU
78 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Release|Any CPU.Build.0 = Release|Any CPU
79 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Release|ARM.ActiveCfg = Release|ARM
80 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Release|ARM.Build.0 = Release|ARM
81 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Release|x64.ActiveCfg = Release|x64
82 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Release|x64.Build.0 = Release|x64
83 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Release|x86.ActiveCfg = Release|x86
84 | {20FCEF54-3863-4A06-BD74-013392DB2746}.Release|x86.Build.0 = Release|x86
85 | EndGlobalSection
86 | GlobalSection(SolutionProperties) = preSolution
87 | HideSolutionNode = FALSE
88 | EndGlobalSection
89 | GlobalSection(ExtensibilityGlobals) = postSolution
90 | SolutionGuid = {445EB6CA-0E28-4614-8B23-0C90146122D4}
91 | EndGlobalSection
92 | EndGlobal
93 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/LICENSE.md
--------------------------------------------------------------------------------
/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/README.md
--------------------------------------------------------------------------------
/UWP/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
--------------------------------------------------------------------------------
/UWP/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel;
7 | using Windows.ApplicationModel.Activation;
8 | using Windows.Foundation;
9 | using Windows.Foundation.Collections;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 | using Windows.UI.Xaml.Controls.Primitives;
13 | using Windows.UI.Xaml.Data;
14 | using Windows.UI.Xaml.Input;
15 | using Windows.UI.Xaml.Media;
16 | using Windows.UI.Xaml.Navigation;
17 |
18 | namespace FhirPathTesterUWP
19 | {
20 | ///
21 | /// Provides application-specific behavior to supplement the default Application class.
22 | ///
23 | sealed partial class App : Application
24 | {
25 | ///
26 | /// Initializes the singleton application object. This is the first line of authored code
27 | /// executed, and as such is the logical equivalent of main() or WinMain().
28 | ///
29 | public App()
30 | {
31 | this.InitializeComponent();
32 | this.Suspending += OnSuspending;
33 | }
34 |
35 | ///
36 | /// Invoked when the application is launched normally by the end user. Other entry points
37 | /// will be used such as when the application is launched to open a specific file.
38 | ///
39 | /// Details about the launch request and process.
40 | protected override void OnLaunched(LaunchActivatedEventArgs e)
41 | {
42 | Frame rootFrame = Window.Current.Content as Frame;
43 |
44 | // Do not repeat app initialization when the Window already has content,
45 | // just ensure that the window is active
46 | if (rootFrame == null)
47 | {
48 | // Create a Frame to act as the navigation context and navigate to the first page
49 | rootFrame = new Frame();
50 |
51 | rootFrame.NavigationFailed += OnNavigationFailed;
52 |
53 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
54 | {
55 | //TODO: Load state from previously suspended application
56 | }
57 |
58 | // Place the frame in the current Window
59 | Window.Current.Content = rootFrame;
60 | }
61 |
62 | if (e.PrelaunchActivated == false)
63 | {
64 | if (rootFrame.Content == null)
65 | {
66 | // When the navigation stack isn't restored navigate to the first page,
67 | // configuring the new page by passing required information as a navigation
68 | // parameter
69 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
70 | }
71 | // Ensure the current window is active
72 | Window.Current.Activate();
73 | }
74 | }
75 |
76 | ///
77 | /// Invoked when Navigation to a certain page fails
78 | ///
79 | /// The Frame which failed navigation
80 | /// Details about the navigation failure
81 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
82 | {
83 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
84 | }
85 |
86 | ///
87 | /// Invoked when application execution is being suspended. Application state is saved
88 | /// without knowing whether the application will be terminated or resumed with the contents
89 | /// of memory still intact.
90 | ///
91 | /// The source of the suspend request.
92 | /// Details about the suspend request.
93 | private void OnSuspending(object sender, SuspendingEventArgs e)
94 | {
95 | var deferral = e.SuspendingOperation.GetDeferral();
96 | //TODO: Save application state and stop any background activity
97 | deferral.Complete();
98 | }
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-16.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-16_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-16_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-20.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-20_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-20_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-24.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-256.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-256_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-256_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-30.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-30_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-30_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-32.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-32_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-32_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-36.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-36_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-36_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-40.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-40_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-40_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-48.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-48_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-48_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-60.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-60_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-60_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-64.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-64_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-64_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-72.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-72_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-72_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-80.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-80_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-80_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-96.png
--------------------------------------------------------------------------------
/UWP/Assets/AppList/AppList.targetsize-96_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/AppList/AppList.targetsize-96_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/Large/Large310x310Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Large/Large310x310Logo.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/Large/Large310x310Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Large/Large310x310Logo.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/Large/Large310x310Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Large/Large310x310Logo.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/Large/Large310x310Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Large/Large310x310Logo.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/Large/Large310x310Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Large/Large310x310Logo.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/LargeTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/LargeTile.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/LargeTile.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/LargeTile.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/LargeTile.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/LargeTile.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/LargeTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/LargeTile.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/LargeTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/LargeTile.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/Medium/Medium150x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Medium/Medium150x150Logo.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/Medium/Medium150x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Medium/Medium150x150Logo.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/Medium/Medium150x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Medium/Medium150x150Logo.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/Medium/Medium150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Medium/Medium150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/Medium/Medium150x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Medium/Medium150x150Logo.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/Small/Small71x71Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Small/Small71x71Logo.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/Small/Small71x71Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Small/Small71x71Logo.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/Small/Small71x71Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Small/Small71x71Logo.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/Small/Small71x71Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Small/Small71x71Logo.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/Small/Small71x71Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Small/Small71x71Logo.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/SmallTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SmallTile.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/SmallTile.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SmallTile.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/SmallTile.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SmallTile.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/SmallTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SmallTile.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/SmallTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SmallTile.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/SplashScreen.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SplashScreen.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/SplashScreen.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SplashScreen.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/SplashScreen.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SplashScreen.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/SplashScreen/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SplashScreen/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/SplashScreen/SplashScreen.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SplashScreen/SplashScreen.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/SplashScreen/SplashScreen.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SplashScreen/SplashScreen.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/SplashScreen/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SplashScreen/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/SplashScreen/SplashScreen.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/SplashScreen/SplashScreen.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/Square150x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square150x150Logo.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/Square150x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square150x150Logo.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/Square150x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square150x150Logo.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/Square150x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square150x150Logo.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.targetsize-16.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.targetsize-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.targetsize-24.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.targetsize-256.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.targetsize-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.targetsize-32.png
--------------------------------------------------------------------------------
/UWP/Assets/Square44x44Logo.targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Square44x44Logo.targetsize-48.png
--------------------------------------------------------------------------------
/UWP/Assets/Store/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Store/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/Store/StoreLogo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Store/StoreLogo.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/Store/StoreLogo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Store/StoreLogo.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/Store/StoreLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Store/StoreLogo.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/Store/StoreLogo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Store/StoreLogo.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/StoreLogo.backup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/StoreLogo.backup.png
--------------------------------------------------------------------------------
/UWP/Assets/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/StoreLogo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/StoreLogo.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/StoreLogo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/StoreLogo.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/StoreLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/StoreLogo.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/StoreLogo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/StoreLogo.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/Wide/Wide310x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Wide/Wide310x150Logo.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/Wide/Wide310x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Wide/Wide310x150Logo.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/Wide/Wide310x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Wide/Wide310x150Logo.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/Wide/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Wide/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/Wide/Wide310x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Wide/Wide310x150Logo.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/Wide310x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Wide310x150Logo.scale-100.png
--------------------------------------------------------------------------------
/UWP/Assets/Wide310x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Wide310x150Logo.scale-125.png
--------------------------------------------------------------------------------
/UWP/Assets/Wide310x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Wide310x150Logo.scale-150.png
--------------------------------------------------------------------------------
/UWP/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/UWP/Assets/Wide310x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/Wide310x150Logo.scale-400.png
--------------------------------------------------------------------------------
/UWP/Assets/fhir-lab-ico-300x300.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/fhir-lab-ico-300x300.png
--------------------------------------------------------------------------------
/UWP/Assets/fhir-lab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/UWP/Assets/fhir-lab.png
--------------------------------------------------------------------------------
/UWP/FhirPathTesterUWP.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {36DBDF82-1301-4C06-8BE1-1E4EE5DFAE70}
8 | AppContainerExe
9 | Properties
10 | FhirPathTesterUWP
11 | FhirPathTesterUWP
12 | en-US
13 | UAP
14 | 10.0.17763.0
15 | 10.0.17134.0
16 | 14
17 | 512
18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
19 |
20 |
21 | 5B51CBCC73FF3A926EB1156CADAA40E9531DA231
22 | True
23 | Always
24 | x86|x64|arm
25 | win10-arm;win10-arm-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot
26 | True
27 | False
28 | True
29 | 0
30 |
31 |
32 | true
33 | bin\x86\Debug\
34 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
35 | ;2008
36 | full
37 | x86
38 | false
39 | prompt
40 | true
41 |
42 |
43 | bin\x86\Release\
44 | TRACE;NETFX_CORE;WINDOWS_UWP
45 | true
46 | true
47 | ;2008
48 | pdbonly
49 | x86
50 | false
51 | prompt
52 | true
53 | true
54 |
55 |
56 | true
57 | bin\ARM\Debug\
58 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
59 | ;2008
60 | full
61 | ARM
62 | false
63 | prompt
64 | true
65 |
66 |
67 | bin\ARM\Release\
68 | TRACE;NETFX_CORE;WINDOWS_UWP
69 | true
70 | true
71 | ;2008
72 | pdbonly
73 | ARM
74 | false
75 | prompt
76 | true
77 | true
78 |
79 |
80 | true
81 | bin\x64\Debug\
82 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
83 | ;2008
84 | full
85 | x64
86 | false
87 | prompt
88 | true
89 |
90 |
91 | bin\x64\Release\
92 | TRACE;NETFX_CORE;WINDOWS_UWP
93 | true
94 | true
95 | ;2008
96 | pdbonly
97 | x64
98 | false
99 | prompt
100 | true
101 | true
102 |
103 |
104 |
105 |
106 | PreserveNewest
107 |
108 |
109 |
110 |
111 | CustomFluentPathFunctions.cs
112 |
113 |
114 | FhirPathProcessor.cs
115 |
116 |
117 | App.xaml
118 |
119 |
120 | MainPage.xaml
121 |
122 |
123 |
124 |
125 |
126 | Designer
127 |
128 |
129 |
130 |
131 | Designer
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 | MSBuild:Compile
248 | Designer
249 |
250 |
251 | MSBuild:Compile
252 | Designer
253 |
254 |
255 |
256 |
257 | 1.3.0
258 |
259 |
260 | 1.3.0
261 |
262 |
263 | 1.3.0
264 |
265 |
266 | 1.3.0
267 |
268 |
269 | 1.3.0
270 |
271 |
272 | 6.2.8
273 |
274 |
275 | 5.1.1
276 |
277 |
278 | 5.1.1
279 |
280 |
281 | 1.0.1
282 |
283 |
284 | 1.0.0
285 |
286 |
287 |
288 |
289 |
290 | dstu2
291 |
292 |
293 |
294 |
295 | stu3
296 |
297 |
298 |
299 |
300 | r4
301 |
302 |
303 |
304 |
305 | dstu2
306 |
307 |
308 |
309 |
310 | stu3
311 |
312 |
313 |
314 |
315 | r4
316 |
317 |
318 |
319 |
320 | 14.0
321 |
322 |
323 |
330 |
--------------------------------------------------------------------------------
/UWP/FhirPathTesterUWP.nuget.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | True
5 | NuGet
6 | C:\git\FhirPathTester\UWP\project.lock.json
7 | C:\git\FhirPathTester\packages
8 | C:\git\FhirPathTester\packages;C:\Program Files (x86)\Microsoft SDKs\NuGetPackagesFallback\
9 | ProjectJson
10 | 4.6.2
11 |
12 |
13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/UWP/FhirPathTesterUWP.nuget.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/UWP/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 | Visible
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
222 |
223 |
224 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
246 |
247 |
248 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
--------------------------------------------------------------------------------
/UWP/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | extern alias dstu2;
2 | extern alias stu3;
3 | extern alias r4;
4 | // https://github.com/NuGet/Home/issues/4989#issuecomment-311042085
5 |
6 | using System;
7 | using System.Collections.Generic;
8 | using System.ComponentModel;
9 | using System.Linq;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 |
13 | using Hl7.Fhir.ElementModel;
14 |
15 | using fp2 = dstu2.Hl7.Fhir.FhirPath;
16 | using f2 = dstu2.Hl7.Fhir.Model;
17 |
18 | using fp3 = stu3.Hl7.Fhir.FhirPath;
19 | using f3 = stu3.Hl7.Fhir.Model;
20 |
21 | using fp4 = r4.Hl7.Fhir.FhirPath;
22 | using f4 = r4.Hl7.Fhir.Model;
23 |
24 | using Hl7.FhirPath;
25 | using Hl7.FhirPath.Expressions;
26 | using System.Text;
27 | using Windows.UI.Xaml.Documents;
28 | using FhirPathTester;
29 | using Windows.ApplicationModel.DataTransfer;
30 | using Windows.Storage;
31 | using System.Net.Http;
32 | using Newtonsoft.Json;
33 | using Newtonsoft.Json.Linq;
34 | using System.Collections.ObjectModel;
35 | using Windows.ApplicationModel;
36 | using Hl7.Fhir.Utility;
37 |
38 | namespace FhirPathTesterUWP
39 | {
40 | ///
41 | /// An empty page that can be used on its own or navigated to within a Frame.
42 | ///
43 | public sealed partial class MainPage : Page, INotifyPropertyChanged
44 | {
45 | public MainPage()
46 | {
47 | this.InitializeComponent();
48 |
49 | TextControlFontSize = 22;
50 | textboxInputXML.Text = "\r\n \r\n \r\n \r\n \r\n";
51 | textboxExpression.Text = "birthDate < today()";
52 | DataContext = this;
53 |
54 | // and remember the initial state
55 | AddHistoryEntry(textboxInputXML.Text, textboxExpression.Text);
56 | System.Threading.Tasks.Task.Run(() => {
57 | // in the background load up the 3 sets of ClassLibraries
58 | r4.Hl7.Fhir.Serialization.BaseFhirParser.Inspector.Import(typeof(r4.Hl7.Fhir.Serialization.BaseFhirParser).Assembly);
59 | // stu3.Hl7.Fhir.Serialization.BaseFhirParser.Inspector.Import(typeof(stu3.Hl7.Fhir.Serialization.BaseFhirParser).Assembly);
60 | dstu2.Hl7.Fhir.Serialization.BaseFhirParser.Inspector.Import(typeof(dstu2.Hl7.Fhir.Serialization.BaseFhirParser).Assembly);
61 | FhirPathProcessor.GetResourceNavigatorSTU3("", out var errs);
62 | });
63 | }
64 |
65 | public ObservableCollection HistoryItems { get; set; }
66 | = new ObservableCollection();
67 | //{
68 | // new Tuple($"{DateTime.Now.ToString()}", "\r\n \r\n \r\n \r\n \r\n", ""),
69 | // new Tuple($"{DateTime.Now.ToString()}", "\r\n \r\n \r\n \r\n \r\n", "")
70 | //};
71 | private int _size;
72 | public int TextControlFontSize
73 | {
74 | get { return _size; }
75 | set
76 | {
77 | if (_size != value)
78 | {
79 | _size = value;
80 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(TextControlFontSize)));
81 | }
82 | }
83 | }
84 |
85 | public event PropertyChangedEventHandler PropertyChanged;
86 |
87 | private System.Collections.Generic.SortedList _locations = new SortedList();
88 | private ITypedElement GetResourceNavigator(out EvaluationContext evalContext)
89 | {
90 | string parseErrors2;
91 | var inputNavDSTU2 = FhirPathProcessor.GetResourceNavigatorDSTU2(textboxInputXML.Text, out parseErrors2);
92 | string parseErrors3;
93 | var inputNavSTU3 = FhirPathProcessor.GetResourceNavigatorSTU3(textboxInputXML.Text, out parseErrors3);
94 | string parseErrors4;
95 | var inputNavR4 = FhirPathProcessor.GetResourceNavigatorR4(textboxInputXML.Text, out parseErrors4);
96 |
97 | if (!string.IsNullOrEmpty(parseErrors2) || !string.IsNullOrEmpty(parseErrors3) || !string.IsNullOrEmpty(parseErrors4))
98 | {
99 | ResetResults();
100 | AppendResults(String.Join("\r\n--------------------\r\n", parseErrors2, parseErrors3, parseErrors4), true);
101 | }
102 | if (inputNavR4 != null || inputNavSTU3 != null || inputNavDSTU2 != null)
103 | {
104 | ISourceNode node;
105 | if (textboxInputXML.Text.StartsWith("{"))
106 | node = Hl7.Fhir.Serialization.FhirJsonNode.Parse(textboxInputXML.Text);
107 | else
108 | node = Hl7.Fhir.Serialization.FhirXmlNode.Parse(textboxInputXML.Text);
109 | _locations.Clear();
110 | int lastPos = 0;
111 | IPositionInfo lastNode = null;
112 | AddLocations(node, ref lastNode, ref lastPos, textboxInputXML.Text.ToCharArray());
113 | string t = _locations.LastOrDefault(c => c.Key < textboxInputXML.SelectionStart).Value;
114 | System.Diagnostics.Trace.WriteLine($"Focused: {t}");
115 | }
116 |
117 | if (inputNavR4 != null)
118 | btnR4.Visibility = Visibility.Visible;
119 | else
120 | btnR4.Visibility = Visibility.Collapsed;
121 |
122 | if (inputNavSTU3 != null)
123 | btnSTU3.Visibility = Visibility.Visible;
124 | else
125 | btnSTU3.Visibility = Visibility.Collapsed;
126 |
127 | if (inputNavDSTU2 != null)
128 | btnDSTU2.Visibility = Visibility.Visible;
129 | else
130 | btnDSTU2.Visibility = Visibility.Collapsed;
131 |
132 | if (inputNavR4 != null)
133 | {
134 | evalContext = new fp4.FhirEvaluationContext(inputNavR4);
135 | return inputNavR4;
136 | }
137 | if (inputNavSTU3 != null)
138 | {
139 | evalContext = new fp3.FhirEvaluationContext(inputNavSTU3);
140 | return inputNavSTU3;
141 | }
142 | evalContext = new fp2.FhirEvaluationContext(inputNavDSTU2);
143 | return inputNavDSTU2;
144 | }
145 |
146 | private void AddLocations(ISourceNode node, ref IPositionInfo lastNode, ref int lastCharPos, char[] chars)
147 | {
148 | int location = 0;
149 | IPositionInfo posInfo = (node as IAnnotated)?.Annotation();
150 | if (posInfo == null)
151 | posInfo = (node as IAnnotated)?.Annotation();
152 | if (posInfo != null)
153 | {
154 | if (lastNode == null)
155 | location = 0;
156 | else
157 | {
158 | var linesToSkip = posInfo.LineNumber - lastNode.LineNumber;
159 | var colsToSkip = posInfo.LinePosition;
160 | if (linesToSkip == 0)
161 | colsToSkip -= lastNode.LinePosition;
162 | while (linesToSkip > 0 && lastCharPos < chars.Length)
163 | {
164 | lastCharPos++;
165 | if (chars[lastCharPos] == '\r')
166 | linesToSkip--;
167 | }
168 | lastCharPos += colsToSkip;
169 | location = lastCharPos; // need to patch this
170 | }
171 | lastNode = posInfo;
172 | _locations.Add(location, node.Location);
173 | // System.Diagnostics.Trace.WriteLine($"{location}: {node.Location}");
174 | }
175 | lastCharPos = location;
176 | foreach (var child in node.Children())
177 | {
178 | AddLocations(child, ref lastNode, ref lastCharPos, chars);
179 | }
180 | }
181 |
182 | private void ButtonGo_Click(object sender, RoutedEventArgs e)
183 | {
184 | EvaluationContext evalContext;
185 | var inputNav = GetResourceNavigator(out evalContext);
186 | if (inputNav == null)
187 | return;
188 |
189 | // Don't need to cache this, it is cached in the fhir-client
190 | CompiledExpression xps = null;
191 | try
192 | {
193 | xps = FhirPathProcessor._compiler.Compile(textboxExpression.Text);
194 | }
195 | catch (Exception ex)
196 | {
197 | SetResults("Expression compilation error:\r\n" + ex.Message, true);
198 | return;
199 | }
200 |
201 | IEnumerable prepopulatedValues = null;
202 | if (xps != null)
203 | {
204 | try
205 | {
206 | prepopulatedValues = xps(inputNav, evalContext);
207 | }
208 | catch (Exception ex)
209 | {
210 | SetResults("Expression evaluation error:\r\n" + ex.Message);
211 | AppendParseTree();
212 | return;
213 | }
214 |
215 | ResetResults();
216 | AddHistoryEntry(textboxInputXML.Text, textboxExpression.Text);
217 |
218 | try
219 | {
220 | FhirPathProcessor.ProcessPrepopulatedValues(prepopulatedValues, AppendXmlFramentResults, AppendResults);
221 | }
222 | catch (Exception ex)
223 | {
224 | SetResults("Processing results error:\r\n" + ex.Message);
225 | return;
226 | }
227 | }
228 |
229 | AppendParseTree();
230 | }
231 |
232 | private void AddHistoryEntry(string content, string expression)
233 | {
234 | if (HistoryItems.Count > 0)
235 | {
236 | // check to see if the content has changed
237 | var lastEntry = HistoryItems[0];
238 | if (lastEntry.ResourceContent == content && lastEntry.Expression == expression)
239 | return; // (no need to add a new entry)
240 | }
241 | HistoryItems.Insert(0, new HistoryItemDetails(content, expression));
242 | // trim the history to only 100 items
243 | while (HistoryItems.Count > 100)
244 | HistoryItems.Remove(HistoryItems.Last());
245 | }
246 |
247 | private string AppendXmlFramentResults(string fragment, string tooltip)
248 | {
249 | if (fragment.Length > 100)
250 | {
251 | // pretty print the content
252 | var doc = System.Xml.Linq.XDocument.Parse(fragment);
253 | fragment = doc.ToString(System.Xml.Linq.SaveOptions.None);
254 | }
255 | AppendResults(fragment.Replace(" xmlns=\"http://hl7.org/fhir\"", ""), false, tooltip);
256 | return fragment;
257 | }
258 |
259 | private void AppendParseTree()
260 | {
261 | // Grab the parse expression
262 | StringBuilder sb = new StringBuilder();
263 | var expr = FhirPathProcessor._compiler.Parse(textboxExpression.Text);
264 | OutputExpression(expr, sb, "");
265 | // textboxResult.Text += expr.Dump();
266 | AppendResults("\r\n\r\n----------------\r\n" + sb.ToString());
267 | }
268 |
269 | private void OutputExpression(Hl7.FhirPath.Expressions.Expression expr, StringBuilder sb, string prefix)
270 | {
271 | if (expr is ChildExpression)
272 | {
273 | var func = expr as ChildExpression;
274 | OutputExpression(func.Focus, sb, prefix + "-- ");
275 | sb.AppendFormat("{0}{1}\r\n", prefix, func.ChildName);
276 | return;
277 | }
278 | if (expr is FunctionCallExpression)
279 | {
280 | var func = expr as FunctionCallExpression;
281 | sb.AppendFormat("{0}{1}\r\n", prefix, func.FunctionName);
282 | OutputExpression(func.Focus, sb, prefix + "-- ");
283 | foreach (var item in func.Arguments)
284 | {
285 | OutputExpression(item, sb, prefix + " ");
286 | }
287 | return;
288 | }
289 | //else if (expr is BinaryExpression)
290 | //{
291 | // var func = expr as BinaryExpression;
292 | // sb.AppendLine(func.FunctionName);
293 | // OutputExpression(func.Left, sb);
294 | // sb.AppendLine(func.Op);
295 | // OutputExpression(func.Right, sb);
296 | // return;
297 | //}
298 | else if (expr is ConstantExpression)
299 | {
300 | var func = expr as ConstantExpression;
301 | sb.AppendFormat("{0}{1} (constant)\r\n", prefix, func.Value.ToString());
302 | return;
303 | }
304 | else if (expr is VariableRefExpression)
305 | {
306 | var func = expr as VariableRefExpression;
307 | // sb.AppendFormat("{0}{1} (variable ref)\r\n", prefix, func.Name);
308 | return;
309 | }
310 | sb.Append(expr.GetType().ToString());
311 | }
312 |
313 | private void ButtonPredicate_Click(object sender, RoutedEventArgs e)
314 | {
315 | EvaluationContext evalContext;
316 | var inputNav = GetResourceNavigator(out evalContext);
317 | if (inputNav == null)
318 | return;
319 |
320 | // Don't need to cache this, it is cached in the fhir-client
321 | Hl7.FhirPath.CompiledExpression xps = null;
322 | try
323 | {
324 | xps = FhirPathProcessor._compiler.Compile(textboxExpression.Text);
325 | }
326 | catch (Exception ex)
327 | {
328 | SetResults("Expression compilation error:\r\n" + ex.Message);
329 | return;
330 | }
331 |
332 | if (xps != null)
333 | {
334 | try
335 | {
336 | AddHistoryEntry(textboxInputXML.Text, textboxExpression.Text);
337 | bool result = xps.Predicate(inputNav, evalContext);
338 | SetResults(result.ToString());
339 | }
340 | catch (Exception ex)
341 | {
342 | SetResults("Expression evaluation error:\r\n" + ex.Message);
343 | return;
344 | }
345 | }
346 |
347 | AppendParseTree();
348 | }
349 |
350 | private async void textboxInputXML_Drop(object sender, DragEventArgs e)
351 | {
352 | try
353 | {
354 | // This is the place where we want to support the reading of the file from the file system
355 | // to make the testing of other instances really easy
356 | if (e.DataView != null)
357 | {
358 | var formats = e.DataView.AvailableFormats;
359 |
360 | if (formats.Contains(StandardDataFormats.WebLink))
361 | {
362 | Uri webLink = await e.DataView.GetWebLinkAsync();
363 | if (!string.IsNullOrEmpty(webLink.OriginalString))
364 | {
365 | using (HttpClient client = new HttpClient())
366 | {
367 | using (var response = await client.GetAsync(webLink))
368 | {
369 | string contents = await response.Content.ReadAsStringAsync();
370 | textboxInputXML.Text = contents;
371 | if (response.Content.Headers.ContentType.MediaType.Contains("xml"))
372 | FhirPathProcessor.PretifyXML(textboxInputXML.Text, (val) => { textboxInputXML.Text = val; });
373 | if (response.Content.Headers.ContentType.MediaType.Contains("json"))
374 | FhirPathProcessor.PretifyJson(textboxInputXML.Text, (val) => { textboxInputXML.Text = val; });
375 | AddHistoryEntry(textboxInputXML.Text, textboxExpression.Text);
376 | }
377 | }
378 | }
379 | e.Handled = true;
380 | return;
381 | }
382 |
383 | if (formats.Contains(StandardDataFormats.StorageItems))
384 | {
385 | var items = await e.DataView.GetStorageItemsAsync();
386 | if (items.Count > 0)
387 | {
388 | if (items[0].IsOfType(StorageItemTypes.File))
389 | {
390 | string contents = await FileIO.ReadTextAsync((StorageFile)items[0]);
391 | textboxInputXML.Text = contents;
392 | AddHistoryEntry(textboxInputXML.Text, textboxExpression.Text);
393 | }
394 | }
395 | e.Handled = true;
396 | }
397 | }
398 | }
399 | catch (Exception ex)
400 | {
401 | System.Diagnostics.Debug.WriteLine(ex.Message);
402 | }
403 | }
404 |
405 | private void textboxInputXML_DragOver(object sender, DragEventArgs e)
406 | {
407 | e.AcceptedOperation = Windows.ApplicationModel.DataTransfer.DataPackageOperation.Copy | Windows.ApplicationModel.DataTransfer.DataPackageOperation.Link;
408 | }
409 |
410 | private void textboxInputXML_PreviewDragOver(object sender, DragEventArgs e)
411 | {
412 | e.Handled = true;
413 | }
414 |
415 | private void Button_Click(object sender, RoutedEventArgs e)
416 | {
417 | if (TextControlFontSize > sliderFontSize.Minimum)
418 | TextControlFontSize--;
419 | }
420 |
421 | private void Button_Click_1(object sender, RoutedEventArgs e)
422 | {
423 | if (TextControlFontSize < sliderFontSize.Maximum)
424 | TextControlFontSize++;
425 | // SmartAuthentication();
426 | }
427 |
428 | private void NotifyUser(string message)
429 | {
430 | labelStatus.Text = message;
431 | }
432 |
433 | private void ButtonCheckExpression_Click(object sender, RoutedEventArgs e)
434 | {
435 | EvaluationContext evalContext;
436 | var inputNav = GetResourceNavigator(out evalContext);
437 | if (inputNav == null)
438 | return;
439 |
440 | // Don't need to cache this, it is cached in the fhir-client
441 | Hl7.FhirPath.Expressions.Expression expr = null;
442 | try
443 | {
444 | expr = FhirPathProcessor._compiler.Parse(textboxExpression.Text);
445 | }
446 | catch (Exception ex)
447 | {
448 | SetResults("Expression compilation error:\r\n" + ex.Message, true);
449 | return;
450 | }
451 |
452 | if (expr != null)
453 | {
454 | try
455 | {
456 | FhirPathProcessor.CheckExpression(inputNav, expr, AppendResults, ResetResults);
457 | }
458 | catch (Exception ex)
459 | {
460 | SetResults("Expression Check error:\r\n" + ex.Message, true);
461 | return;
462 | }
463 | }
464 | }
465 |
466 | private void ResetResults()
467 | {
468 | textboxResult.Blocks.Clear();
469 | _tooltipText.Clear();
470 | ToolTipService.SetToolTip(textboxResult, null);
471 | }
472 |
473 | private void SetResults(string text, bool error = false)
474 | {
475 | ResetResults();
476 | var run = new Run() { Text = text };
477 | var para = new Paragraph();
478 | para.Inlines.Add(run);
479 | textboxResult.Blocks.Add(para);
480 | if (error)
481 | {
482 | para.Foreground = new Windows.UI.Xaml.Media.SolidColorBrush(Windows.UI.Colors.Red);
483 | para.FontWeight = Windows.UI.Text.FontWeights.Bold;
484 | }
485 | }
486 |
487 | Dictionary _tooltipText = new Dictionary();
488 | private void AppendResults(string text, bool error = false, string tooltip = null)
489 | {
490 | var run = new Run() { Text = text };
491 | var para = new Paragraph();
492 | para.Inlines.Add(run);
493 | para.Margin = new Thickness(2);
494 | textboxResult.Blocks.Add(para);
495 | if (error)
496 | {
497 | para.Foreground = new Windows.UI.Xaml.Media.SolidColorBrush(Windows.UI.Colors.Red);
498 | para.FontWeight = Windows.UI.Text.FontWeights.Bold;
499 | }
500 | if (!string.IsNullOrEmpty(tooltip))
501 | {
502 | // try this one out sometime
503 | // https://stackoverflow.com/questions/27649534/set-tooltip-on-range-of-text-in-wpf-richtextbox
504 | _tooltipText.Add(run, tooltip);
505 | if (ToolTipService.GetToolTip(textboxResult) == null)
506 | {
507 | ToolTip tip = new ToolTip();
508 | tip.Content = tooltip;
509 | ToolTipService.SetToolTip(textboxResult, tip);
510 | tip.Opened += Tip_Opened;
511 | tip.Closed += Tip_Closed;
512 | }
513 |
514 | //var run2 = new Run() { Text = " " + tooltip.Replace("\r\n", ", ") };
515 | //run2.Foreground = new Windows.UI.Xaml.Media.SolidColorBrush(Windows.UI.Colors.Gray);
516 | //run2.FontStyle = Windows.UI.Text.FontStyle.Italic;
517 | //para.Inlines.Add(run2);
518 | }
519 | }
520 |
521 | private void Tip_Closed(object sender, RoutedEventArgs e)
522 | {
523 | }
524 |
525 | private void Tip_Opened(object sender, RoutedEventArgs e)
526 | {
527 | // current mouse position
528 | var pointerPosition = Windows.UI.Core.CoreWindow.GetForCurrentThread().PointerPosition;
529 | var x = pointerPosition.X - Window.Current.Bounds.X;
530 | var y = pointerPosition.Y - Window.Current.Bounds.Y;
531 | ToolTip tip = sender as ToolTip;
532 | var ttv = textboxResult.TransformToVisual(Window.Current.Content);
533 | var sc = ttv.TransformPoint(new Windows.Foundation.Point(0, 0));
534 | var tp = textboxResult.GetPositionFromPoint(new Windows.Foundation.Point(x - sc.X, y - sc.Y));
535 | if (tp.Parent is Run run)
536 | {
537 | if (_tooltipText.ContainsKey(run))
538 | {
539 | tip.Content = _tooltipText[run];
540 | }
541 | }
542 | }
543 |
544 | private void BtnXML_Click(object sender, RoutedEventArgs e)
545 | {
546 | FhirPathProcessor.PretifyXML(textboxInputXML.Text, (val) => { textboxInputXML.Text = val; });
547 | }
548 |
549 | private void BtnJson_Click(object sender, RoutedEventArgs e)
550 | {
551 | FhirPathProcessor.PretifyJson(textboxInputXML.Text, (val) => { textboxInputXML.Text = val; });
552 | }
553 |
554 | private void TextboxInputXML_SelectionChanged(object sender, RoutedEventArgs e)
555 | {
556 | CursorPosition(textboxInputXML, out int row, out int col);
557 | textPosition.Text = $"Ln {row} Col {col}";
558 | if (_locations.Count > 0)
559 | {
560 | string t = _locations.LastOrDefault(c => c.Key < textboxInputXML.SelectionStart).Value;
561 | labelStatus.Text = $"{t}";
562 | }
563 | }
564 |
565 | ///
566 | /// Returns the current column position on the current line the cursor is on.
567 | ///
568 | public static void CursorPosition(TextBox tb, out int row, out int col)
569 | {
570 | int endMarker = tb.SelectionStart;
571 |
572 | if (endMarker == 0)
573 | {
574 | row = 1;
575 | col = 1;
576 | return;
577 | }
578 |
579 | int i = 0;
580 | col = 1;
581 | row = 1;
582 |
583 | foreach (char c in tb.Text)
584 | {
585 | i++;
586 | col++;
587 |
588 | if (c == '\r')
589 | {
590 | row++;
591 | col = 1;
592 | }
593 |
594 | if (i == endMarker)
595 | {
596 | return;
597 | }
598 | }
599 | }
600 |
601 | private void ListHistory_ItemClick(object sender, ItemClickEventArgs e)
602 | {
603 | // read the value from the list item
604 | var item = e.ClickedItem as HistoryItemDetails;
605 | if (!string.IsNullOrEmpty(item.ResourceContent))
606 | textboxInputXML.Text = item.ResourceContent;
607 | if (!string.IsNullOrEmpty(item.Expression))
608 | textboxExpression.Text = item.Expression;
609 | }
610 |
611 | private void HamburgerMenuControl_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
612 | {
613 | var item = args.InvokedItem as string;
614 | if (item == "History")
615 | listHistory.Visibility = Visibility.Visible;
616 | else
617 | listHistory.Visibility = Visibility.Collapsed;
618 | if (item == "About")
619 | markdownHost.Visibility = Visibility.Visible;
620 | else
621 | markdownHost.Visibility = Visibility.Collapsed;
622 | }
623 |
624 | private async void Page_Loaded(object sender, RoutedEventArgs e)
625 | {
626 | string initalMarkdownText = await FileIO.ReadTextAsync(await Package.Current.InstalledLocation.GetFileAsync("about.md"));
627 | markdownAboutBox.Text = initalMarkdownText;
628 | }
629 |
630 | private void TextboxResult_PointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
631 | {
632 | ToolTip temp = ToolTipService.GetToolTip(textboxResult) as ToolTip;
633 | if (temp != null)
634 | {
635 | // current mouse position
636 | //var pointerPosition = Windows.UI.Core.CoreWindow.GetForCurrentThread().PointerPosition;
637 | //var x = pointerPosition.X - Window.Current.Bounds.X;
638 | //var y = pointerPosition.Y - Window.Current.Bounds.Y;
639 | //var ttv = textboxResult.TransformToVisual(Window.Current.Content);
640 | //var sc = ttv.TransformPoint(new Windows.Foundation.Point(0, 0));
641 | var tp = textboxResult.GetPositionFromPoint(e.GetCurrentPoint(textboxResult).Position);
642 | if (tp.Parent is Run run)
643 | {
644 | if (_tooltipText.ContainsKey(run))
645 | {
646 | temp.Content = _tooltipText[run];
647 | if (!temp.IsOpen)
648 | {
649 | temp.IsOpen = true;
650 | }
651 | e.Handled = true;
652 | }
653 | }
654 | }
655 | }
656 |
657 | private void TextboxResult_PointerExited(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
658 | {
659 | ToolTip temp = ToolTipService.GetToolTip(textboxResult) as ToolTip;
660 | if (temp?.IsOpen == true)
661 | temp.IsOpen = false;
662 | }
663 | }
664 | }
665 |
--------------------------------------------------------------------------------
/UWP/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 | fhirpath tester
11 | brianpos.com
12 | Assets\StoreLogo.png
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/UWP/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("FhirPathTesterUWP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("FhirPathTesterUWP")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.4.0")]
28 | [assembly: AssemblyFileVersion("1.0.4.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/UWP/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/UWP/about.md:
--------------------------------------------------------------------------------
1 |
2 | ## Introduction ##
3 | This is a simple technical utility to offer a simple UI for testing
4 | fhirpath expressions with R4, STU3 and DSTU2 [HL7 FHIR][fhir-spec] resources.
5 |
6 | It can execute the expressions as either an extract (for use in search
7 | expressions) or validate (for use in StructureDefinition constraints)
8 |
9 | New Features in v1.0.8:
10 |
11 | * Full support for R4
12 | * Ability to convert/pretty print the source between XML/Json (click on the label you want to format the content to)
13 | * Custom fhirpath function LuhnTest()
14 | * Updated to recent HL7 FHIR NuGet packages 1.3.0
15 | * Drag and drop example resource files from the web! (not, does not support authentication to the FHIR Server)
16 | * Hotkeys Ctrl+E and Ctrl+T to the execute and validate buttons
17 | * Supports the Dark system theme
18 | * Display the fhirpath location of the cursor in the status bar once an extract or validate call has been performed
19 |
20 | Key features:
21 |
22 | * Evaluation [FhirPath][fhirpath-spec] expressions (extract/validate)
23 | * Parsing of the expression against the schema of the example resource type
24 | * Concurrent support for R4, STU3 and DSTU2 (automatically selecting)
25 | * Support for Xml and Json parsers (automatically detecting)
26 | * Drag and drop example resource files from the file-system
27 |
28 | Additional custom fhirpath functions:
29 |
30 | | Function | Description
31 | | - | - |
32 | | propname | Returns the name of the property at the selected location |
33 | | pathname | Returns the full path of the selected location (includes array selectors at every point) |
34 | | shortpathname | Returns the full path of the selected location (does not include array selectors where the cardinality of the property is 0..1)|
35 | | dateadd(field, amount) | Add a value to a datetime field (field == yy,mm,dd,hh,hi,ss) |
36 | | LuhnTest | Checks the selected value to verify that it conforms to the Luhn Checksum algorithm https://rosettacode.org/wiki/Luhn_test_of_credit_card_numbers#C.23 |
37 | | DoubleMetaphone | Returns the double metaphone approximation of the selected node (will break into multiple words, and return a value for each word) |
38 | | Metaphone | Returns the metaphone approximation of the selected node (will break into multiple words, and return a value for each word) |
39 | | Stem | Returns the Porter 2 Stemming alogorithm for each word in the input location |
40 |
41 | ## Support
42 | Issues can be raised in the GitHub repository at [https://github.com/brianpos/fhirpathtester/issues](https://github.com/brianpos/fhirpathtester/issues).
43 | You are welcome to register your bugs and feature suggestions there.
44 | For questions and broader discussions, use the .NET FHIR Implementers chat on [Zulip][netapi-zulip].
45 |
46 | ## Contributing ##
47 | I would gladly welcome any contributors!
48 |
49 | If you want to participate in this project, I'm using [Git Flow][nvie] for branch management, so please submit your commits using pull requests no on the develop branches mentioned above!
50 |
51 | [fhirpath-spec]: http://hl7.org/fhirpath/
52 | [r4-spec]: http://www.hl7.org/fhir/R4
53 | [stu3-spec]: http://www.hl7.org/fhir/STU3
54 | [dstu2-spec]: http://hl7.org/fhir/DSTU2/index.html
55 | [netapi-zulip]: https://chat.fhir.org/#narrow/stream/dotnet
56 | [netapi-docu]: http://ewoutkramer.github.io/fhir-net-api/docu-index.html
57 | [nvie]: http://nvie.com/posts/a-successful-git-branching-model/
58 |
59 |
60 | ## Licensing
61 | HL7®, FHIR® and the FHIR Mark® are trademarks owned by Health Level Seven International,
62 | registered with the United States Patent and Trademark Office.
63 |
--------------------------------------------------------------------------------
/WPF/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/WPF/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/WPF/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace FhirPathTester
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/WPF/CustomFluentPathFunctions.cs:
--------------------------------------------------------------------------------
1 | extern alias dstu2;
2 | extern alias stu3;
3 | // https://github.com/NuGet/Home/issues/4989#issuecomment-311042085
4 |
5 | using Hl7.Fhir.ElementModel;
6 | using Hl7.Fhir.Model.Primitives;
7 | // using Hl7.Fhir.FluentPath;
8 | //using Hl7.Fhir.Model;
9 | using Hl7.FhirPath;
10 | using Hl7.FhirPath.Expressions;
11 | using System;
12 | using System.Collections.Generic;
13 | using System.Linq;
14 |
15 | namespace FhirPathTester
16 | {
17 | public class CustomFluentPathFunctions
18 | {
19 | static private SymbolTable _st;
20 | static public SymbolTable Scope
21 | {
22 | get
23 | {
24 | if (_st == null)
25 | {
26 | _st = new SymbolTable().AddStandardFP();
27 | // _st.Add("rand", (object f) => { return "slim"; });
28 |
29 | // Custom function that returns the name of the property, rather than its value
30 | _st.Add("propname", (object f) =>
31 | {
32 | if (f is IEnumerable)
33 | {
34 | object[] bits = (f as IEnumerable).Select(i =>
35 | {
36 | return i.Name;
37 | }).ToArray();
38 | return FhirValueListCreate(bits);
39 | }
40 | return FhirValueListCreate(new object[] { "?" } );
41 | });
42 | _st.Add("pathname", (object f) =>
43 | {
44 | if (f is IEnumerable)
45 | {
46 | object[] bits = (f as IEnumerable).Select(i =>
47 | {
48 | return i.Location;
49 | }).ToArray();
50 | return FhirValueListCreate(bits);
51 | }
52 | return FhirValueListCreate(new object[] { "?" });
53 | });
54 | _st.Add("shortpathname", (object f) =>
55 | {
56 | if (f is IEnumerable)
57 | {
58 | var bits = (f as IEnumerable).Select(i =>
59 | {
60 | if (i is IShortPathGenerator spg)
61 | {
62 | return spg.ShortPath;
63 | }
64 | return "?";
65 | });
66 | return ElementNode.CreateList(bits);
67 | }
68 | return FhirValueListCreate(new object[] { "?" });
69 | });
70 | _st.Add("DoubleMetaphone", (IEnumerable f) =>
71 | {
72 | var mp = new Phonix.DoubleMetaphone(10);
73 | return f.Select(it => it.Value as string)
74 | .Where(s => !string.IsNullOrEmpty(s))
75 | .SelectMany(s => System.Text.RegularExpressions.Regex.Split(s, @"\s+"))
76 | .SelectMany(word => ElementNode.CreateList(mp.BuildKey(word)) );
77 | });
78 | _st.Add("Metaphone", (IEnumerable f) =>
79 | {
80 | var mp = new Phonix.Metaphone(10);
81 | return f.Select(it => it.Value as string)
82 | .Where(s => !string.IsNullOrEmpty(s))
83 | .SelectMany(s => System.Text.RegularExpressions.Regex.Split(s, @"\s+"))
84 | .SelectMany(word => ElementNode.CreateList(mp.BuildKey(word)));
85 | });
86 | _st.Add("Stem", (IEnumerable f) =>
87 | {
88 | var stemmer = new Porter2Stemmer.EnglishPorter2Stemmer();
89 | return f.Select(it => it.Value as string)
90 | .Where(s => !string.IsNullOrEmpty(s))
91 | .SelectMany(s => System.Text.RegularExpressions.Regex.Split(s, @"\s+"))
92 | .SelectMany(word => ElementNode.CreateList(stemmer.Stem(word).Value));
93 | });
94 | _st.Add("Fuzzy", (IEnumerable f) =>
95 | {
96 | var stemmer = new Porter2Stemmer.EnglishPorter2Stemmer();
97 | var mp = new Phonix.DoubleMetaphone(10);
98 | return f.Select(it => it.Value as string)
99 | .Where(s => !string.IsNullOrEmpty(s))
100 | .Select(s => FuzzyTrim(s))
101 | .SelectMany(s => System.Text.RegularExpressions.Regex.Split(s, @"\s+"))
102 | .Take(4)
103 | .Select(word => stemmer.Stem(word).Value)
104 | .SelectMany(wordStem => ElementNode.CreateList(mp.BuildKey(wordStem)));
105 | });
106 | //_st.Add("commonpathname", (object f) =>
107 | //{
108 | // if (f is IEnumerable)
109 | // {
110 | // object[] bits = (f as IEnumerable).Select(i =>
111 | // {
112 | // if (i is stu3.Hl7.Fhir.ElementModel.PocoElementNode)
113 | // {
114 | // return (i as stu3.Hl7.Fhir.ElementModel.PocoElementNode).CommonPath;
115 | // }
116 | // if (i is dstu2.Hl7.Fhir.ElementModel.PocoElementNode)
117 | // {
118 | // return (i as dstu2.Hl7.Fhir.ElementModel.PocoElementNode).CommonPath;
119 | // }
120 | // return "?";
121 | // }).ToArray();
122 | // return FhirValueListCreate(bits);
123 | // }
124 | // return FhirValueListCreate(new object[] { "?" });
125 | //});
126 |
127 | // Custom function for evaluating the date operation (custom Healthconnex)
128 | _st.Add("dateadd", (PartialDateTime f, string field, long amount) =>
129 | {
130 | DateTimeOffset dto = f.ToUniversalTime();
131 | int value = (int)amount;
132 |
133 | // Need to convert the amount and field to compensate for partials
134 | //TimeSpan ts = new TimeSpan();
135 |
136 | switch (field)
137 | {
138 | case "yy": dto = dto.AddYears(value); break;
139 | case "mm": dto = dto.AddMonths(value); break;
140 | case "dd": dto = dto.AddDays(value); break;
141 | case "hh": dto = dto.AddHours(value); break;
142 | case "mi": dto = dto.AddMinutes(value); break;
143 | case "ss": dto = dto.AddSeconds(value); break;
144 | }
145 | PartialDateTime changedDate = PartialDateTime.Parse(PartialDateTime.FromDateTime(dto).ToString().Substring(0, f.ToString().Length));
146 | return changedDate;
147 | });
148 |
149 | // Custom LUHN Checksum algorithm
150 | // https://rosettacode.org/wiki/Luhn_test_of_credit_card_numbers#C.23
151 | _st.Add("LuhnTest", (string str) =>
152 | {
153 | return str.LuhnCheck();
154 | });
155 | }
156 | return _st;
157 | }
158 | }
159 |
160 | static public string FuzzyTrim(string word)
161 | {
162 | if (string.IsNullOrEmpty(word))
163 | return null;
164 | return word.Replace("'", "").Replace("\"", "").Replace("`", "")
165 | .Replace(",", " ").Replace("/", " ").Replace("-", " ").Replace(".", " ").Replace("~", " ").Replace("?", " ")
166 | .Replace(";", " ").Replace("&", " ").Replace("*", " ").Replace("(", " ").Replace(")", " ").Replace("_", " ");
167 | }
168 |
169 | private static object FhirValueListCreate(object[] values)
170 | {
171 | return ElementNode.CreateList(values);
172 | }
173 | }
174 |
175 | public static class Luhn
176 | {
177 | public static bool LuhnCheck(this string cardNumber)
178 | {
179 | if (string.IsNullOrEmpty(cardNumber))
180 | return true;
181 | return LuhnCheck(cardNumber.Select(c => c - '0').ToArray());
182 | }
183 |
184 | private static bool LuhnCheck(this int[] digits)
185 | {
186 | return GetCheckValue(digits) == 0;
187 | }
188 |
189 | private static int GetCheckValue(int[] digits)
190 | {
191 | return digits.Select((d, i) => i % 2 == digits.Length % 2 ? ((2 * d) % 10) + d / 5 : d).Sum() % 10;
192 | }
193 | }
194 | }
195 |
--------------------------------------------------------------------------------
/WPF/FhirPathExpressionProcessing.cs:
--------------------------------------------------------------------------------
1 | extern alias stu3;
2 | // using Hl7.FhirPath.Expressions;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Linq.Expressions;
9 |
10 | namespace FhirPathTester
11 | {
12 | public class QuestionnaireExpressionProcessing
13 | {
14 | private Expression CheckExpression(Hl7.FhirPath.Expressions.Expression expr, Type T, List namedProps)
15 | {
16 | if (expr is Hl7.FhirPath.Expressions.ChildExpression ce)
17 | {
18 | var focusContext = CheckExpression(ce.Focus, T, namedProps);
19 | var cm = stu3.Hl7.Fhir.Introspection.ClassMapping.Create(T);
20 | var childContext = Expression.Property(focusContext, cm.FindMappedElementByName(ce.ChildName).Name);
21 | if (childContext != null)
22 | return childContext;
23 | throw new ArgumentException("Failed to find parameter", ce.ChildName);
24 | }
25 | if (expr is Hl7.FhirPath.Expressions.FunctionCallExpression func)
26 | {
27 | var funcs = _compiler.Symbols.Filter(func.FunctionName, func.Arguments.Count() + 1);
28 | if (funcs.Count() == 0 && !(expr is Hl7.FhirPath.Expressions.BinaryExpression))
29 | {
30 | // AppendResults($"{prefix}{func.FunctionName} *invalid function name*", true);
31 | }
32 | else
33 | {
34 | AppendResults($"{prefix}{func.FunctionName}");
35 | }
36 | var focusContext = CheckExpression(func.Focus, context);
37 |
38 | if (func.FunctionName == "binary.as")
39 | {
40 | if (func.Arguments.Count() != 2)
41 | {
42 | AppendResults($"{prefix}{func.FunctionName} INVALID AS Operation", true);
43 | return focusContext;
44 | }
45 | var argContextResult = CheckExpression(func.Arguments.First(), focusContext);
46 | var typeArg = func.Arguments.Skip(1).FirstOrDefault() as Hl7.FhirPath.Expressions.ConstantExpression;
47 | string typeCast = typeArg?.Value as string;
48 | argContextResult.RestrictToType(typeCast);
49 | return argContextResult;
50 | }
51 | else if (func.FunctionName == "resolve")
52 | {
53 | // need to check what the available outcomes of resolving this are, and switch types to this
54 | }
55 | else
56 | {
57 | // if this is a where operation and the context inside is a linkId = , then check that the linkId is in context
58 | if (func.FunctionName == "where" && func.Arguments.Count() == 1 && (func.Arguments.First() as Hl7.FhirPath.Expressions.BinaryExpression)?.Op == "=")
59 | {
60 | var op = func.Arguments.First() as Hl7.FhirPath.Expressions.BinaryExpression;
61 | var argContextResult = CheckExpression(op, focusContext);
62 |
63 | // Filter the values that are not in this set
64 | focusContext._2gs = argContextResult._2gs;
65 | focusContext._2qs = argContextResult._2qs;
66 | }
67 | else
68 | {
69 | foreach (var item in func.Arguments)
70 | {
71 | var argContextResult = CheckExpression(item, focusContext);
72 | }
73 | }
74 | if (func.FunctionName == "binary.=")
75 | {
76 | Hl7.FhirPath.Expressions.ChildExpression prop = (Hl7.FhirPath.Expressions.ChildExpression)func.Arguments.Where(a => a is Hl7.FhirPath.Expressions.ChildExpression).FirstOrDefault();
77 | Hl7.FhirPath.Expressions.ConstantExpression value = (Hl7.FhirPath.Expressions.ConstantExpression)func.Arguments.Where(a => a is Hl7.FhirPath.Expressions.ConstantExpression).FirstOrDefault();
78 | if (prop?.ChildName == "linkId" && value != null)
79 | {
80 | var groupLinkIds = focusContext._2gs?.Select(i => i.LinkId).ToArray();
81 | var questionLinkIds = focusContext._2qs?.Select(i => i.LinkId).ToArray();
82 |
83 | // filter out all of the other linkIds from the list
84 | focusContext._2gs?.RemoveAll(g => g.LinkId != value.Value as string);
85 | focusContext._2qs?.RemoveAll(q => q.LinkId != value.Value as string);
86 |
87 | // Validate that there is an item with this value that is reachable
88 | if (focusContext._2gs?.Count() == 0 || focusContext._2qs?.Count() == 0)
89 | {
90 | // this linkId didn't exist in this context!
91 | string toolTip = "Available LinkIds:";
92 | if (groupLinkIds != null)
93 | toolTip += $"\r\nGroup: {String.Join(", ", groupLinkIds)}";
94 | if (questionLinkIds != null)
95 | toolTip += $"\r\nQuestion: {String.Join(", ", questionLinkIds)}";
96 | AppendResults($"{prefix}{func.FunctionName} LinkId is not valid in this context", true, toolTip);
97 | }
98 | }
99 | }
100 | }
101 |
102 | return focusContext;
103 | }
104 | //else if (expr is BinaryExpression)
105 | //{
106 | // var func = expr as BinaryExpression;
107 | // sb.AppendLine(func.FunctionName);
108 | // CheckExpression(func.Left, sb);
109 | // sb.AppendLine(func.Op);
110 | // CheckExpression(func.Right, sb);
111 | // return;
112 | //}
113 | else if (expr is Hl7.FhirPath.Expressions.ConstantExpression constExpr)
114 | {
115 | return Expression.Constant(constExpr.Value); // context doesn't propagate from this
116 | }
117 | else if (expr is Hl7.FhirPath.Expressions.VariableRefExpression vref)
118 | {
119 | // sb.AppendFormat("{0}{1} (variable ref)\r\n", prefix, func.Name);
120 | return context;
121 | }
122 | // AppendResults(expr.GetType().ToString());
123 | return context;
124 | }
125 |
126 | }
127 | }
128 |
--------------------------------------------------------------------------------
/WPF/FhirPathTester.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {EB2E4288-28D4-407F-B019-CAAA763FA810}
8 | WinExe
9 | Properties
10 | FhirPathTester
11 | FhirPathTester
12 | v4.5.2
13 | 512
14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
15 | 4
16 | SAK
17 | SAK
18 | SAK
19 | SAK
20 |
21 |
22 |
23 | AnyCPU
24 | true
25 | full
26 | false
27 | bin\Debug\
28 | DEBUG;TRACE
29 | prompt
30 | 4
31 | false
32 |
33 |
34 | AnyCPU
35 | pdbonly
36 | true
37 | bin\Release\
38 | TRACE
39 | prompt
40 | 4
41 | false
42 |
43 |
44 | fhir-lab-ico-300x300.ico
45 |
46 |
47 |
48 | ..\packages\Hl7.Fhir.DSTU2.1.3.0\lib\net45\Hl7.Fhir.DSTU2.Core.dll
49 | dstu2
50 |
51 |
52 | ..\packages\Hl7.Fhir.ElementModel.1.3.0\lib\net45\Hl7.Fhir.ElementModel.dll
53 |
54 |
55 | ..\packages\Hl7.Fhir.R4.1.3.0\lib\net45\Hl7.Fhir.R4.Core.dll
56 | r4
57 |
58 |
59 | ..\packages\Hl7.Fhir.Serialization.1.3.0\lib\net45\Hl7.Fhir.Serialization.dll
60 |
61 |
62 | ..\packages\Hl7.Fhir.STU3.1.3.0\lib\net45\Hl7.Fhir.STU3.Core.dll
63 | stu3
64 |
65 |
66 | ..\packages\Hl7.Fhir.Support.1.3.0\lib\net45\Hl7.Fhir.Support.dll
67 |
68 |
69 | ..\packages\Hl7.FhirPath.1.3.0\lib\net45\Hl7.FhirPath.dll
70 |
71 |
72 | ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
73 |
74 |
75 | ..\packages\Phonix.1.0.1.0\lib\net40\Phonix.dll
76 |
77 |
78 | ..\packages\Porter2Stemmer.1.0.0\lib\net452\Porter2Stemmer.dll
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | ..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | 4.0
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | MSBuild:Compile
107 | Designer
108 |
109 |
110 | MSBuild:Compile
111 | Designer
112 |
113 |
114 | App.xaml
115 | Code
116 |
117 |
118 |
119 |
120 | MainWindow.xaml
121 | Code
122 |
123 |
124 |
125 |
126 | Code
127 |
128 |
129 | True
130 | True
131 | Resources.resx
132 |
133 |
134 | True
135 | Settings.settings
136 | True
137 |
138 |
139 | ResXFileCodeGenerator
140 | Resources.Designer.cs
141 |
142 |
143 | Designer
144 |
145 |
146 | SettingsSingleFileGenerator
147 | Settings.Designer.cs
148 |
149 |
150 |
151 |
152 |
153 | Designer
154 |
155 |
156 |
157 |
158 |
159 |
160 |
167 |
--------------------------------------------------------------------------------
/WPF/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/WPF/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | extern alias dstu2;
2 | extern alias stu3;
3 | extern alias r4;
4 |
5 | using Hl7.Fhir.ElementModel;
6 |
7 | using fp2 = dstu2.Hl7.Fhir.FhirPath;
8 | using f2 = dstu2.Hl7.Fhir.Model;
9 |
10 | using fp3 = stu3.Hl7.Fhir.FhirPath;
11 | using f3 = stu3.Hl7.Fhir.Model;
12 |
13 | using fp4 = r4.Hl7.Fhir.FhirPath;
14 | using f4 = r4.Hl7.Fhir.Model;
15 |
16 | using Hl7.FhirPath;
17 | using Hl7.FhirPath.Expressions;
18 | using System;
19 | using System.Collections.Generic;
20 | using System.ComponentModel;
21 | using System.Linq;
22 | using System.Text;
23 | using System.Windows;
24 | using System.Windows.Input;
25 | using System.Windows.Documents;
26 | using System.Windows.Media;
27 | using Newtonsoft.Json.Linq;
28 | using Newtonsoft.Json;
29 |
30 | namespace FhirPathTester
31 | {
32 | ///
33 | /// Interaction logic for MainWindow.xaml
34 | ///
35 | public partial class MainWindow : Window, INotifyPropertyChanged
36 | {
37 | public int TextControlFontSize { get; set; }
38 |
39 | public MainWindow()
40 | {
41 | TextControlFontSize = 22;
42 | InitializeComponent();
43 | textboxInputXML.Text = "\r\n\r\n\r\n\r\n";
44 | textboxExpression.Text = "birthDate < today() | identifier.assigner.display.extension.where(url='3').value.code";
45 | }
46 |
47 | public event PropertyChangedEventHandler PropertyChanged;
48 |
49 | private ITypedElement GetResourceNavigator(out EvaluationContext evalContext)
50 | {
51 | string parseErrors2;
52 | var inputNavDSTU2 = FhirPathProcessor.GetResourceNavigatorDSTU2(textboxInputXML.Text, out parseErrors2);
53 | string parseErrors3;
54 | var inputNavSTU3 = FhirPathProcessor.GetResourceNavigatorSTU3(textboxInputXML.Text, out parseErrors3);
55 | string parseErrors4;
56 | var inputNavR4 = FhirPathProcessor.GetResourceNavigatorR4(textboxInputXML.Text, out parseErrors4);
57 |
58 | if (!string.IsNullOrEmpty(parseErrors2) || !string.IsNullOrEmpty(parseErrors3) || !string.IsNullOrEmpty(parseErrors4))
59 | {
60 | ResetResults();
61 | textboxResult.AppendText(String.Join("\r\n--------------------\r\n", parseErrors2, parseErrors3, parseErrors4));
62 | }
63 |
64 | if (inputNavR4 != null)
65 | labelR4.Visibility = Visibility.Visible;
66 | else
67 | labelR4.Visibility = Visibility.Collapsed;
68 | if (inputNavSTU3 != null)
69 | labelSTU3.Visibility = Visibility.Visible;
70 | else
71 | labelSTU3.Visibility = Visibility.Collapsed;
72 |
73 | if (inputNavDSTU2 != null)
74 | labelDSTU2.Visibility = Visibility.Visible;
75 | else
76 | labelDSTU2.Visibility = Visibility.Collapsed;
77 |
78 | if (inputNavR4 != null)
79 | {
80 | evalContext = new fp4.FhirEvaluationContext(inputNavR4);
81 | return inputNavSTU3;
82 | }
83 | if (inputNavSTU3 != null)
84 | {
85 | evalContext = new fp3.FhirEvaluationContext(inputNavSTU3);
86 | return inputNavSTU3;
87 | }
88 | evalContext = new fp2.FhirEvaluationContext(inputNavDSTU2);
89 | return inputNavDSTU2;
90 | }
91 |
92 | private void ButtonGo_Click(object sender, RoutedEventArgs e)
93 | {
94 | EvaluationContext evalContext;
95 | var inputNav = GetResourceNavigator(out evalContext);
96 | if (inputNav == null)
97 | return;
98 |
99 | // Don't need to cache this, it is cached in the fhir-client
100 | CompiledExpression xps = null;
101 | try
102 | {
103 | xps = FhirPathProcessor._compiler.Compile(textboxExpression.Text);
104 | }
105 | catch (Exception ex)
106 | {
107 | SetResults("Expression compilation error:\r\n" + ex.Message);
108 | return;
109 | }
110 |
111 | IEnumerable prepopulatedValues = null;
112 | if (xps != null)
113 | {
114 | try
115 | {
116 | prepopulatedValues = xps(inputNav, evalContext);
117 | }
118 | catch (Exception ex)
119 | {
120 | SetResults("Expression evaluation error:\r\n" + ex.Message);
121 | AppendParseTree();
122 | return;
123 | }
124 |
125 | ResetResults();
126 | try
127 | {
128 | FhirPathProcessor.ProcessPrepopulatedValues(prepopulatedValues, AppendXmlFramentResults, AppendResults);
129 | }
130 | catch (Exception ex)
131 | {
132 | SetResults("Processing results error:\r\n" + ex.Message);
133 | return;
134 | }
135 | }
136 |
137 | AppendParseTree();
138 | }
139 |
140 | private string AppendXmlFramentResults(string fragment, string tooltip)
141 | {
142 | if (fragment.Length > 100)
143 | {
144 | // pretty print the content
145 | var doc = System.Xml.Linq.XDocument.Parse(fragment);
146 | fragment = doc.ToString(System.Xml.Linq.SaveOptions.None);
147 | }
148 | AppendResults(fragment.Replace(" xmlns=\"http://hl7.org/fhir\"", ""), false, tooltip);
149 | return fragment;
150 | }
151 |
152 | private void AppendParseTree()
153 | {
154 | // Grab the parse expression
155 | StringBuilder sb = new StringBuilder();
156 | var expr = FhirPathProcessor._compiler.Parse(textboxExpression.Text);
157 | OutputExpression(expr, sb, "");
158 | // textboxResult.Text += expr.Dump();
159 | AppendResults("\r\n\r\n----------------\r\n" + sb.ToString());
160 | }
161 |
162 | private void OutputExpression(Hl7.FhirPath.Expressions.Expression expr, StringBuilder sb, string prefix)
163 | {
164 | if (expr is ChildExpression)
165 | {
166 | var func = expr as ChildExpression;
167 | OutputExpression(func.Focus, sb, prefix + "-- ");
168 | sb.AppendFormat("{0}{1}\r\n", prefix, func.ChildName);
169 | return;
170 | }
171 | if (expr is FunctionCallExpression)
172 | {
173 | var func = expr as FunctionCallExpression;
174 | sb.AppendFormat("{0}{1}\r\n", prefix, func.FunctionName);
175 | OutputExpression(func.Focus, sb, prefix + "-- ");
176 | foreach (var item in func.Arguments)
177 | {
178 | OutputExpression(item, sb, prefix + " ");
179 | }
180 | return;
181 | }
182 | //else if (expr is BinaryExpression)
183 | //{
184 | // var func = expr as BinaryExpression;
185 | // sb.AppendLine(func.FunctionName);
186 | // OutputExpression(func.Left, sb);
187 | // sb.AppendLine(func.Op);
188 | // OutputExpression(func.Right, sb);
189 | // return;
190 | //}
191 | else if (expr is ConstantExpression)
192 | {
193 | var func = expr as ConstantExpression;
194 | sb.AppendFormat("{0}{1} (constant)\r\n", prefix, func.Value.ToString());
195 | return;
196 | }
197 | else if (expr is VariableRefExpression)
198 | {
199 | var func = expr as VariableRefExpression;
200 | // sb.AppendFormat("{0}{1} (variable ref)\r\n", prefix, func.Name);
201 | return;
202 | }
203 | sb.Append(expr.GetType().ToString());
204 | }
205 |
206 | private void ButtonPredicate_Click(object sender, RoutedEventArgs e)
207 | {
208 | EvaluationContext evalContext;
209 | var inputNav = GetResourceNavigator(out evalContext);
210 | if (inputNav == null)
211 | return;
212 |
213 | // Don't need to cache this, it is cached in the fhir-client
214 | Hl7.FhirPath.CompiledExpression xps = null;
215 | try
216 | {
217 | xps = FhirPathProcessor._compiler.Compile(textboxExpression.Text);
218 | }
219 | catch (Exception ex)
220 | {
221 | SetResults("Expression compilation error:\r\n" + ex.Message);
222 | return;
223 | }
224 |
225 | if (xps != null)
226 | {
227 | try
228 | {
229 | bool result = xps.Predicate(inputNav, evalContext);
230 | SetResults(result.ToString());
231 | }
232 | catch (Exception ex)
233 | {
234 | SetResults("Expression evaluation error:\r\n" + ex.Message);
235 | return;
236 | }
237 | }
238 |
239 | AppendParseTree();
240 | }
241 |
242 | private void textboxExpression_MouseWheel(object sender, MouseWheelEventArgs e)
243 | {
244 | if (e.Delta > 100 || e.Delta < -100)
245 | {
246 | TextControlFontSize += e.Delta / 100;
247 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(TextControlFontSize)));
248 | }
249 | }
250 | #region << Drag Drop Functionality >>
251 | private void textboxInputXML_Drop(object sender, DragEventArgs e)
252 | {
253 | // This is the place where we want to support the reading of the file from the file system
254 | // to make the testing of other instances really easy
255 | var formats = e.Data.GetFormats();
256 | if (e.Data.GetDataPresent("FileName"))
257 | {
258 | string[] contents = e.Data.GetData("FileName") as string[];
259 | if (contents.Length > 0)
260 | textboxInputXML.Text = System.IO.File.ReadAllText(contents[0]);
261 | e.Handled = true;
262 | }
263 | }
264 |
265 | private void textboxInputXML_DragOver(object sender, DragEventArgs e)
266 | {
267 | e.Effects = DragDropEffects.Copy | DragDropEffects.Link;
268 | }
269 |
270 | private void textboxInputXML_PreviewDragOver(object sender, DragEventArgs e)
271 | {
272 | e.Handled = true;
273 | }
274 | #endregion
275 |
276 | private void textboxInputXML_SelectionChanged(object sender, RoutedEventArgs e)
277 | {
278 | int lineIndex = 0;
279 | int colIndex = 0;
280 | try
281 | {
282 | int charIndex = textboxInputXML.CaretIndex;
283 | lineIndex = textboxInputXML.GetLineIndexFromCharacterIndex(charIndex);
284 | colIndex = charIndex - textboxInputXML.GetCharacterIndexFromLineIndex(lineIndex);
285 | }
286 | catch (Exception)
287 | {
288 | }
289 | textboxRow.Content = $"Ln {lineIndex + 1}";
290 | textboxCol.Content = $"Col {colIndex}";
291 | }
292 |
293 | private void ButtonCheckExpression_Click(object sender, RoutedEventArgs e)
294 | {
295 | EvaluationContext evalContext;
296 | var inputNav = GetResourceNavigator(out evalContext);
297 | if (inputNav == null)
298 | return;
299 |
300 | // Don't need to cache this, it is cached in the fhir-client
301 | Hl7.FhirPath.Expressions.Expression expr = null;
302 | try
303 | {
304 | expr = FhirPathProcessor._compiler.Parse(textboxExpression.Text);
305 | }
306 | catch (Exception ex)
307 | {
308 | SetResults("Expression compilation error:\r\n" + ex.Message, true);
309 | return;
310 | }
311 |
312 | if (expr != null)
313 | {
314 | try
315 | {
316 | FhirPathProcessor.CheckExpression(inputNav, expr, AppendResults, ResetResults);
317 | }
318 | catch (Exception ex)
319 | {
320 | SetResults("Expression Check error:\r\n" + ex.Message, true);
321 | return;
322 | }
323 | }
324 | }
325 |
326 | private void ResetResults()
327 | {
328 | textboxResult.Document.Blocks.Clear();
329 | }
330 |
331 | private void SetResults(string text, bool error = false)
332 | {
333 | textboxResult.Document.Blocks.Clear();
334 | var run = new Run(text);
335 | var para = new Paragraph(run);
336 | textboxResult.Document.Blocks.Add(para);
337 | if (error)
338 | {
339 | para.Foreground = Brushes.Red;
340 | para.FontWeight = FontWeights.Bold;
341 | }
342 | }
343 | private void AppendResults(string text, bool error = false, string tooltip = null)
344 | {
345 | var run = new Run(text);
346 | var para = new Paragraph(run);
347 | if (!string.IsNullOrEmpty(tooltip))
348 | para.ToolTip = tooltip;
349 | para.Margin = new Thickness(2);
350 | textboxResult.Document.Blocks.Add(para);
351 | if (error)
352 | {
353 | para.Foreground = Brushes.Red;
354 | para.FontWeight = FontWeights.Bold;
355 | }
356 | }
357 |
358 | private void lblXML_MouseUp(object sender, MouseButtonEventArgs e)
359 | {
360 | FhirPathProcessor.PretifyXML(textboxInputXML.Text, (val) => { textboxInputXML.Text = val; });
361 | }
362 |
363 | private void lblJson_MouseUp(object sender, MouseButtonEventArgs e)
364 | {
365 | FhirPathProcessor.PretifyJson(textboxInputXML.Text, (val) => { textboxInputXML.Text = val; });
366 | }
367 | }
368 | }
369 |
--------------------------------------------------------------------------------
/WPF/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("FhirPathTester DSTU2")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("brianpos.com")]
14 | [assembly: AssemblyProduct("FhirPathTester")]
15 | [assembly: AssemblyCopyright("Copyright © 2016")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.4.0")]
55 | [assembly: AssemblyFileVersion("1.0.4.0")]
56 |
--------------------------------------------------------------------------------
/WPF/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace FhirPathTester.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FhirPathTester.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/WPF/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/WPF/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace FhirPathTester.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.1.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/WPF/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/WPF/fhir-lab-ico-300x300.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brianpos/FhirPathTester/b6433d4e611608ed8dba60b64736bc86eafb84b8/WPF/fhir-lab-ico-300x300.ico
--------------------------------------------------------------------------------
/WPF/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/contributors.md:
--------------------------------------------------------------------------------
1 | ## Contributors
2 |
3 | This utility was a collective effort by the following developers:
4 |
5 | Brian Postlethwaite (Telstra Health)
6 |
7 | (anyone ... Bueller ... Bueller ...)
8 |
--------------------------------------------------------------------------------