├── .gitattributes
├── .github
└── dependabot.yml
├── .gitignore
├── Hl7.Fhir.Common.sln
├── LICENSE
├── README.md
├── build
├── RetrieveVersion.ps1
├── UpdateVersion.ps1
├── azure-pipelines.yml
├── build-variables.yml
├── pipeline-variables.yml
├── templates
│ ├── apply-versioning-steps-template.yml
│ ├── sign-dlls-template.yml
│ └── test-job-template.yml
└── tools
│ └── sn.exe
├── clean.bat
├── contributors.md
├── icon-firely-sdk-128.png
├── lib
└── Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
├── pack.bat
├── src
├── Benchmarks
│ ├── Benchmarks.csproj
│ ├── DeserializationBenchmark.cs
│ ├── Program.cs
│ ├── SerializationBenchmarks.cs
│ └── TestData
│ │ ├── fp-test-patient.json
│ │ └── fp-test-patient.xml
├── FhirNetApi.publickey
├── Hl7.Fhir.ElementModel
│ ├── Adapters
│ │ ├── SourceNodeToTypedElementAdapter.cs
│ │ └── TypedElementToSourceNodeAdapter.cs
│ ├── BaseTypedElement.cs
│ ├── DomNode.cs
│ ├── DomNodeList.cs
│ ├── ElementNode.cs
│ ├── ElementNodeComparator.cs
│ ├── ElementNodeExtensions.cs
│ ├── Hl7.Fhir.ElementModel.csproj
│ ├── ICdaInfoSupplier.cs
│ ├── IResourceTypeSupplier.cs
│ ├── IShortPathGenerator.cs
│ ├── ISourceNode.cs
│ ├── ITypedElement.cs
│ ├── Language
│ │ └── TypeSpecifier.cs
│ ├── MaskingNode.cs
│ ├── MaskingNodeSettings.cs
│ ├── PrimitiveElement.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── ScopedNode.cs
│ ├── Serialization
│ │ └── PrimitiveTypeConverter.cs
│ ├── SourceNode.cs
│ ├── SourceNodeComparator.cs
│ ├── SourceNodeExtensions.cs
│ ├── Specification
│ │ ├── ElementDefinitionSummary.cs
│ │ ├── IStructureDefinitionSummaryProvider.cs
│ │ └── XmlRepresentation.cs
│ ├── StructuralTypeException.cs
│ ├── TreeComparisonResult.cs
│ ├── TypedElementOnSourceNode.cs
│ ├── TypedElementSettings.cs
│ └── Types
│ │ ├── Any.cs
│ │ ├── Boolean.cs
│ │ ├── Code.cs
│ │ ├── Concept.cs
│ │ ├── Date.cs
│ │ ├── DateTime.cs
│ │ ├── DateTimePrecision.cs
│ │ ├── Decimal.cs
│ │ ├── Integer.cs
│ │ ├── Long.cs
│ │ ├── Quantity.cs
│ │ ├── Ratio.cs
│ │ ├── String.cs
│ │ └── Time.cs
├── Hl7.Fhir.Serialization
│ ├── FhirFileFormats.cs
│ ├── FhirJsonBuilder.cs
│ ├── FhirJsonBuilderExtensions.cs
│ ├── FhirJsonNode.cs
│ ├── FhirJsonNodeFactory.cs
│ ├── FhirJsonParsingSettings.cs
│ ├── FhirJsonSerializationSettings.cs
│ ├── FhirSerializationFormats.cs
│ ├── FhirXmlBuilder.cs
│ ├── FhirXmlBuilderExtensions.cs
│ ├── FhirXmlNode.cs
│ ├── FhirXmlNodeFactory.cs
│ ├── FhirXmlParsingSettings.cs
│ ├── FhirXmlSerializationSettings.cs
│ ├── Hl7.Fhir.Serialization.csproj
│ ├── INavigatorStream.cs
│ ├── JTokenExtensions.cs
│ ├── JsonNavigatorStream.cs
│ ├── JsonSerializationDetails.cs
│ ├── MissingTypeInformationException.cs
│ ├── NavigatorStreamFactory.cs
│ ├── NavigatorStreamHelper.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── SerializationAnnotations.cs
│ ├── Support
│ │ ├── DateExtensions.cs
│ │ └── GuidExtensions.cs
│ ├── Utility
│ │ └── SerializationUtil.cs
│ ├── XObjectExtensions.cs
│ ├── XObjectFhirXmlExtensions.cs
│ ├── XmlNavigatorStream.cs
│ ├── XmlSerializationDetails.cs
│ └── xhtml
│ │ ├── fhir-xhtml.xsd
│ │ └── xml.xsd
├── Hl7.Fhir.Support.Poco.Tests
│ ├── DeepMatchTest.cs
│ ├── Hl7.Fhir.Support.Poco.Tests.csproj
│ ├── HttpToEntryExtensionsTests.cs
│ ├── Model
│ │ ├── TestAddress.cs
│ │ ├── TestAttachment.cs
│ │ ├── TestBinary.cs
│ │ ├── TestBundle.cs
│ │ ├── TestCodeSystem.cs
│ │ ├── TestEnums.cs
│ │ ├── TestHumanName.cs
│ │ ├── TestOrganization.cs
│ │ ├── TestPatient.cs
│ │ ├── TestQuestionnaire.cs
│ │ └── TestSignature.cs
│ ├── NewPocoSerializers
│ │ ├── FhirJsonDeserializationTests.cs
│ │ ├── FhirJsonSerializationTests.cs
│ │ ├── FhirXmlDeserializationTests.cs
│ │ ├── FhirXmlSerializationTests.cs
│ │ ├── PathStackTests.cs
│ │ ├── SummaryFilterIntegrationTests.cs
│ │ └── SummaryFilterTests.cs
│ ├── PocoValidationTests
│ │ ├── IsValidValueTests.cs
│ │ └── ValidatableObjectTests.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── ResolverTests
│ │ └── CommonFhirPackageSourceTest.cs
│ └── TestData
│ │ ├── fp-test-patient-errors-recovered.json
│ │ ├── fp-test-patient-errors.json
│ │ ├── fp-test-patient.json
│ │ ├── fp-test-patient.xml
│ │ ├── json-edge-cases.json
│ │ ├── mask-text.xml
│ │ └── testPackage.tgz
├── Hl7.Fhir.Support.Poco
│ ├── ElementModel
│ │ ├── IFhirValueProvider.cs
│ │ ├── PocoBuilder.cs
│ │ ├── PocoBuilderSettings.cs
│ │ ├── PocoElementNode.cs
│ │ ├── ScopedNodeExtensions.cs
│ │ ├── TypedElementParseExtensions.cs
│ │ └── TypedSerialization.cs
│ ├── FhirPath
│ │ ├── ElementNavFhirExtensions.cs
│ │ └── FhirEvaluationContext.cs
│ ├── Hl7.Fhir.Support.Poco.csproj
│ ├── Introspection
│ │ ├── ChoiceType.cs
│ │ ├── ClassMapping.cs
│ │ ├── DeclaredTypeAttribute.cs
│ │ ├── FhirElementAttribute.cs
│ │ ├── FhirModelAssemblyAttribute.cs
│ │ ├── FhirTypeAttribute.cs
│ │ ├── IFhirVersionDependent.cs
│ │ ├── ModelInspector.cs
│ │ ├── NotMappedAttribute.cs
│ │ ├── PropertyMapping.cs
│ │ ├── PropertyMappingCollection.cs
│ │ ├── ReferencesAttribute.cs
│ │ └── VersionedAttribute.cs
│ ├── Model
│ │ ├── Base.cs
│ │ ├── Base64Binary.cs
│ │ ├── Canonical.cs
│ │ ├── Code.cs
│ │ ├── CodeOfT.cs
│ │ ├── CodeableConcept.cs
│ │ ├── Coding.cs
│ │ ├── ContactPoint.cs
│ │ ├── Date-comparators.cs
│ │ ├── Date.cs
│ │ ├── DomainResource.cs
│ │ ├── Element.cs
│ │ ├── ElementValue.cs
│ │ ├── Extension.cs
│ │ ├── FhirBoolean.cs
│ │ ├── FhirDateTime-comparators.cs
│ │ ├── FhirDateTime.cs
│ │ ├── FhirDecimal.cs
│ │ ├── FhirString.cs
│ │ ├── FhirTypeConstants.cs
│ │ ├── FhirUri.cs
│ │ ├── FhirUrl.cs
│ │ ├── Generated
│ │ │ ├── BackboneElement.cs
│ │ │ ├── BackboneType.cs
│ │ │ ├── Base64Binary.cs
│ │ │ ├── Canonical.cs
│ │ │ ├── Code.cs
│ │ │ ├── CodeableConcept.cs
│ │ │ ├── Coding.cs
│ │ │ ├── ContactDetail.cs
│ │ │ ├── ContactPoint.cs
│ │ │ ├── DataType.cs
│ │ │ ├── Date.cs
│ │ │ ├── DomainResource.cs
│ │ │ ├── FhirBoolean.cs
│ │ │ ├── FhirDateTime.cs
│ │ │ ├── FhirDecimal.cs
│ │ │ ├── FhirString.cs
│ │ │ ├── FhirUri.cs
│ │ │ ├── FhirUrl.cs
│ │ │ ├── Id.cs
│ │ │ ├── Identifier.cs
│ │ │ ├── Instant.cs
│ │ │ ├── Integer.cs
│ │ │ ├── Integer64.cs
│ │ │ ├── Markdown.cs
│ │ │ ├── Meta.cs
│ │ │ ├── Oid.cs
│ │ │ ├── OperationOutcome.cs
│ │ │ ├── Parameters.cs
│ │ │ ├── Period.cs
│ │ │ ├── PositiveInt.cs
│ │ │ ├── Quantity.cs
│ │ │ ├── Range.cs
│ │ │ ├── Resource.cs
│ │ │ ├── ResourceReference.cs
│ │ │ ├── Template-Bindings.cs
│ │ │ ├── Time.cs
│ │ │ ├── UnsignedInt.cs
│ │ │ ├── UsageContext.cs
│ │ │ ├── Uuid.cs
│ │ │ ├── XHtml.cs
│ │ │ └── _GeneratorLog.cs
│ │ ├── IConformanceResource.cs
│ │ ├── IDeepComparable.cs
│ │ ├── IDeepCopyable.cs
│ │ ├── IExtendable.cs
│ │ ├── ISystemAndCode.cs
│ │ ├── IValue.cs
│ │ ├── Id.cs
│ │ ├── Identifier.cs
│ │ ├── Initializers.cs
│ │ ├── Instant-comparators.cs
│ │ ├── Instant.cs
│ │ ├── Integer.cs
│ │ ├── Integer64.cs
│ │ ├── Markdown.cs
│ │ ├── Narrative.cs
│ │ ├── Oid.cs
│ │ ├── OperationOutcome.cs
│ │ ├── Parameters.cs
│ │ ├── ParametersExtensions.cs
│ │ ├── PatchParametersExtensions.cs
│ │ ├── PositiveInt.cs
│ │ ├── PrimitiveType.cs
│ │ ├── Quantity.cs
│ │ ├── Resource.cs
│ │ ├── ResourceIdentityExtensions.cs
│ │ ├── ResourceReference.cs
│ │ ├── Time-comparators.cs
│ │ ├── Time.cs
│ │ ├── UnsignedInt.cs
│ │ ├── Uuid.cs
│ │ └── XHtml.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Rest
│ │ ├── ContentType.cs
│ │ ├── EntryRequest.cs
│ │ ├── EntryResponse.cs
│ │ ├── EntryToHttpExtensions.cs
│ │ ├── EntryToTypedElementExtensions.cs
│ │ ├── FhirClientSettings.cs
│ │ ├── FhirOperationException.cs
│ │ ├── HttpClientRequester.cs
│ │ ├── HttpToEntryExtensions.cs
│ │ ├── HttpUtil.cs
│ │ ├── IClientRequester.cs
│ │ ├── Legacy
│ │ │ └── WebClientRequester.cs
│ │ ├── ResourceIdentity.cs
│ │ ├── ResourceReferenceExtensions.cs
│ │ ├── RestUrl.cs
│ │ ├── SearchParams.cs
│ │ ├── SearchParamsExtensions.cs
│ │ ├── TaskExtensions.cs
│ │ ├── TokenExtensions.cs
│ │ ├── UriParamList.cs
│ │ └── WebRequestExtensions.cs
│ ├── Serialization
│ │ ├── BundleFilter.cs
│ │ ├── ComplexTypeReader.cs
│ │ ├── DataAnnotationDeserialzationValidator.cs
│ │ ├── DefaultModelFactory.cs
│ │ ├── DeserializationContext.cs
│ │ ├── DeserializationFailedException.cs
│ │ ├── DispatchingReader.cs
│ │ ├── ElementMetadataFilter.cs
│ │ ├── ExceptionAggregator.cs
│ │ ├── FhirJsonConverter.cs
│ │ ├── FhirJsonException.cs
│ │ ├── FhirJsonPocoDeserializer.cs
│ │ ├── FhirJsonPocoDeserializerSettings.cs
│ │ ├── FhirJsonPocoSerializer.cs
│ │ ├── FhirJsonPocoSerializerSettings.cs
│ │ ├── FhirXmlException.cs
│ │ ├── FhirXmlPocoDeserializer.cs
│ │ ├── FhirXmlPocoDeserializerSettings.cs
│ │ ├── FhirXmlPocoSerializer.cs
│ │ ├── IDeserializationValidator.cs
│ │ ├── IsExternalInit.cs
│ │ ├── JsonSerializerOptionsExtensions.cs
│ │ ├── ParserSettings.cs
│ │ ├── PathStack.cs
│ │ ├── PocoDeserializationHelper.cs
│ │ ├── PrimitiveValueReader.cs
│ │ ├── RepeatingElementReader.cs
│ │ ├── RootRenamer.cs
│ │ ├── SerializationFilter.cs
│ │ ├── SerializerSettings.cs
│ │ ├── SystemTextJsonParsingExtensions.cs
│ │ ├── TopLevelFilter.cs
│ │ └── XmlReaderExtensions.cs
│ ├── Specification
│ │ ├── Source
│ │ │ ├── CachedResolver.cs
│ │ │ ├── CommonFhirPackageSource.cs
│ │ │ ├── IArtifactSource.cs
│ │ │ ├── IResourceResolver.cs
│ │ │ ├── MultiResolver.cs
│ │ │ └── SyncToAsyncResolver.cs
│ │ └── Terminology
│ │ │ ├── ClosureParameters.cs
│ │ │ ├── ContextDirection.cs
│ │ │ ├── ITerminologyService.cs
│ │ │ ├── LookupParameters.cs
│ │ │ ├── OperationValidCodeExtensions.cs
│ │ │ ├── SubsumesParameters.cs
│ │ │ └── ValueSetExpanderSettings.cs
│ ├── Support
│ │ ├── Issue.cs
│ │ ├── OperationOutcomeExtensions.cs
│ │ ├── ResolvingConflictException.cs
│ │ ├── ResourceReferenceNotFoundException.cs
│ │ └── ValidationOutcomeExtensions.cs
│ ├── Utility
│ │ └── NullExtensions.cs
│ └── Validation
│ │ ├── AllowedTypesAttribute.cs
│ │ ├── CardinalityAttribute.cs
│ │ ├── CodePatternAttribute.cs
│ │ ├── CodedValidationException.cs
│ │ ├── CodedValidationResult.cs
│ │ ├── DatePatternAttribute.cs
│ │ ├── DateTimePatternAttribute.cs
│ │ ├── DotNetAttributeValidation.cs
│ │ ├── IdPatternAttribute.cs
│ │ ├── NarrativeValidationKind.cs
│ │ ├── NarrativeXhtmlPatternAttribute.cs
│ │ ├── OidPatternAttribute.cs
│ │ ├── TimePatternAttribute.cs
│ │ ├── UriPatternAttribute.cs
│ │ ├── UuidPatternAttribute.cs
│ │ ├── ValidateEnumCodeAttribute.cs
│ │ └── ValidationContextExtensions.cs
├── Hl7.Fhir.Support.Tests
│ ├── ElementModel
│ │ ├── AnyTests.cs
│ │ ├── ConceptTests.cs
│ │ ├── DateTest.cs
│ │ ├── DateTimeTest.cs
│ │ ├── ElementNodeTests.cs
│ │ ├── EquivalenceTests.cs
│ │ ├── QuantityTests.cs
│ │ ├── RatioTest.cs
│ │ └── TimeTest.cs
│ ├── ExceptionAssert.cs
│ ├── FhirPath
│ │ └── FhirPathTests.cs
│ ├── Hl7.Fhir.Support.Tests.csproj
│ ├── Introspection
│ │ ├── ClassMappingTest.cs
│ │ ├── ModelInspectorTest.cs
│ │ ├── PropertyMappingTest.cs
│ │ └── SinceFhirVersionTests.cs
│ ├── JsonAssert.cs
│ ├── Language
│ │ └── TypeSpecifierTests.cs
│ ├── Rest
│ │ └── TestResourceIdentifier.cs
│ ├── Serialization
│ │ ├── CommonTypeParsingTest.cs
│ │ ├── PrimitiveTypeConverterTest.cs
│ │ ├── TestDictionaryImplementation.cs
│ │ └── TypeConverterTest.cs
│ ├── Specification
│ │ └── AsyncSources.cs
│ ├── Utility
│ │ ├── AnnotationListTests.cs
│ │ ├── CacheTests.cs
│ │ ├── CodeGenTests.cs
│ │ ├── DebugDisplayTest.cs
│ │ ├── EnumMappingTest.cs
│ │ ├── EnumerableExtensionTests.cs
│ │ ├── ExceptionSourceTests.cs
│ │ ├── FhirVersionTests.cs
│ │ ├── ObjectListExtensionTests.cs
│ │ └── ResultTests.cs
│ └── XmlAssert.cs
├── Hl7.Fhir.Support
│ ├── Hl7.Fhir.Support.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Specification
│ │ └── FhirRelease.cs
│ ├── Utility
│ │ ├── AnnotationList.cs
│ │ ├── Cache.cs
│ │ ├── CodedException.cs
│ │ ├── DebuggerDisplayExtensions.cs
│ │ ├── DictionaryUtilities.cs
│ │ ├── EnumLiteralAttribute.cs
│ │ ├── EnumUtility.cs
│ │ ├── EnumerableExtensions.cs
│ │ ├── ExceptionSourceExtensions.cs
│ │ ├── ExceptionSourcing.cs
│ │ ├── FhirEnumerationAttribute.cs
│ │ ├── FhirReleaseParser.cs
│ │ ├── IAnnotatable.cs
│ │ ├── IAnnotated.cs
│ │ ├── IPositionInfo.cs
│ │ ├── IntExtensions.cs
│ │ ├── Logging.cs
│ │ ├── ObjectList.cs
│ │ ├── PredicateExtensions.cs
│ │ ├── PropertyInfoExtensions.cs
│ │ ├── ReflectionHelper.cs
│ │ ├── Result.cs
│ │ ├── SemVersion.cs
│ │ ├── StringExtensions.cs
│ │ ├── SyncToAsyncExtensions.cs
│ │ ├── Unit.cs
│ │ └── XmlNs.cs
│ └── Validation
│ │ └── IncorrectElementDefinitionException.cs
├── Hl7.FhirPath.Tests
│ ├── Functions
│ │ ├── CollectionOperatorsTests.cs
│ │ ├── FunctionsTests.cs
│ │ ├── MathOperatorsTests.cs
│ │ ├── OperationsTests.cs
│ │ └── StringFunctionsTests.cs
│ ├── HL7.FhirPath.Tests.csproj
│ ├── Tests
│ │ ├── AssertParser.cs
│ │ ├── BasicFunctionTests.cs
│ │ ├── CastTests.cs
│ │ ├── ConversionsTests.cs
│ │ ├── FhirPathGrammarTest.cs
│ │ ├── FhirPathLexerTest.cs
│ │ ├── IValueProviderFPExtensionsTests.cs
│ │ └── SymbolTableTests.cs
│ └── Utils
│ │ ├── PolyFill.cs
│ │ └── TestData.cs
├── Hl7.FhirPath
│ ├── FhirPath
│ │ ├── CompiledExpression.cs
│ │ ├── EvaluationContext.cs
│ │ ├── Expressions
│ │ │ ├── CallSignature.cs
│ │ │ ├── Closure.cs
│ │ │ ├── ClosureExtensions.cs
│ │ │ ├── DynaDispatcher.cs
│ │ │ ├── EvaluatorVisitor.cs
│ │ │ ├── ExpressionNode.cs
│ │ │ ├── ExpressionVisitor.cs
│ │ │ ├── Invokee.cs
│ │ │ ├── SymbolTable.cs
│ │ │ ├── SymbolTableInit.cs
│ │ │ ├── TreeVisualizerVisitor.cs
│ │ │ └── Typecasts.cs
│ │ ├── FhirPathCompiler.cs
│ │ ├── FhirPathCompilerCache.cs
│ │ ├── Functions
│ │ │ ├── CollectionOperators.cs
│ │ │ ├── ConversionOperators.cs
│ │ │ ├── EqualityOperators.cs
│ │ │ ├── LogicOperators.cs
│ │ │ ├── MathOperators.cs
│ │ │ ├── StringOperators.cs
│ │ │ ├── TypeOperators.cs
│ │ │ └── UtilityOperators.cs
│ │ ├── Language
│ │ │ └── Debugging
│ │ │ │ ├── ISourcePositionInfo.cs
│ │ │ │ ├── OutputEventArgs.cs
│ │ │ │ ├── Source.cs
│ │ │ │ ├── SourceBreakpoint.cs
│ │ │ │ └── StackFrame.cs
│ │ ├── Parser
│ │ │ ├── Grammar.cs
│ │ │ ├── Lexer.cs
│ │ │ └── Operators.cs
│ │ └── TypedElementFPExtensions.cs
│ ├── Hl7.FhirPath.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Sprache
│ │ ├── CommentParser.cs
│ │ ├── IComment.cs
│ │ ├── IInput.cs
│ │ ├── IPositionAware.cs
│ │ ├── IResultOfT.cs
│ │ ├── Input.cs
│ │ ├── Option.cs
│ │ ├── Parse.Optional.cs
│ │ ├── Parse.Positioned.cs
│ │ ├── Parse.Primitives.cs
│ │ ├── Parse.Regex.cs
│ │ ├── Parse.Sequence.cs
│ │ ├── Parse.cs
│ │ ├── ParseException.cs
│ │ ├── ParserOfT.cs
│ │ ├── Position.cs
│ │ ├── Result.cs
│ │ ├── ResultHelper.cs
│ │ ├── Sprache.csproj
│ │ └── StringExtensions.cs
├── firely-net-common-tests.props
├── firely-net-common.props
└── platforms.props
└── test.bat
/.gitattributes:
--------------------------------------------------------------------------------
1 | # file extensions to fail to load in VS. An alternative would be to treat
2 | * text
3 |
4 | *.bmp binary
5 | *.dll binary
6 | *.gif binary
7 | *.jpg binary
8 | *.png binary
9 | *.snk binary
10 | *.snk.enc binary
11 | *.zip binary
12 | *.exe binary
13 | *.tgz binary
14 |
15 | *.ascx text
16 | *.cd text
17 | *.cmd text
18 | *.coffee text
19 | *.config text
20 | *.cs text diff=csharp
21 | *.csproj text merge=union
22 | *.cshtml text
23 | *.css text
24 | *.dtd text
25 | *.edmx text
26 | *.htm text
27 | *.html text
28 | *.js text
29 | *.json text
30 | *.msbuild text
31 | *.nuspec text
32 | *.resx text
33 | *.ruleset text
34 | *.StyleCop text
35 | *.targets text
36 | *.tt text
37 | *.txt text
38 | *.vb text
39 | *.vbhtml text
40 | *.vbproj text merge=union
41 | *.vbs text
42 | *.wsf text
43 | *.xml text
44 | *.xunit text
45 |
46 | *.sln text eol=crlf merge=union
47 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "nuget" # See documentation for possible values
9 | directory: "/" # Location of package manifests
10 | schedule:
11 | interval: "daily"
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2013-2021, HL7, Firely (info@fire.ly), Microsoft Open Technologies
4 | and contributors. See the file CONTRIBUTORS for details
5 |
6 | All rights reserved.
7 |
8 | Redistribution and use in source and binary forms, with or without modification,
9 | are permitted provided that the following conditions are met:
10 |
11 | 1. Redistributions of source code must retain the above copyright notice, this
12 | list of conditions and the following disclaimer.
13 |
14 | 2. Redistributions in binary form must reproduce the above copyright notice, this
15 | list of conditions and the following disclaimer in the documentation and/or
16 | other materials provided with the distribution.
17 |
18 | 3. Neither the name of Firely nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written permission.
21 |
22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
23 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
26 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
29 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PLEASE NOTE
2 |
3 | > THIS REPO IS NO LONGER IN USE
4 |
5 | This repository has served as the place for code shared between the FHIR release branches for the [Firely .NET SDK](https://github.com/FirelyTeam/firely-net-sdk). However, since SDK 5.0, all these branches have been unified and this repo is no longer in use and just kept for archival purposes.
6 |
7 |
8 | _(Original README continues below)_
9 |
10 | |Branch||
11 | |---|---|
12 | |develop|[](https://dev.azure.com/firely/firely-net-sdk/_build/latest?definitionId=83&branchName=develop)|
13 |
14 | |NuGet Package||
15 | |---|---|
16 | |Hl7.Fhir.ElementModel|[](https://www.nuget.org/packages/Hl7.Fhir.ElementModel) |
17 | |Hl7.Fhir.Serialization|[](https://www.nuget.org/packages/Hl7.Fhir.Serialization)|
18 | |Hl7.FhirPath|[](https://www.nuget.org/packages/Hl7.FhirPath)|
19 | |Hl7.Fhir.Support | [](https://www.nuget.org/packages/Hl7.Fhir.Support)|
20 | |Hl7.Fhir.Support.Poco|[](https://www.nuget.org/packages/Hl7.Fhir.Support.Poco) |
21 |
22 | ## Introduction ##
23 | This repository is a submodule-repository for the parent [Firely .NET SDK](https://github.com/FirelyTeam/firely-net-sdk). It contains code that works across all FHIR versions (e.g. DSTU2, R4, etc) and thus is shared by the branches of the parent repository. Although it contains functionality that can be used independently (e.g. the FhirPath evaluator), all issues should be reported to the parent repo.
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/build/RetrieveVersion.ps1:
--------------------------------------------------------------------------------
1 | Push-Location $PsScriptRoot\..\src
2 |
3 | if (Test-Path ..\src\firely-net-common.props -PathType leaf)
4 | {
5 | $propFile = "..\src\firely-net-common.props"
6 | }
7 | else
8 | {
9 | $propFile = "..\src\fhir-net-common.props" # fallback to old name
10 | }
11 |
12 | $xml = [xml](get-content $propFile)
13 |
14 | #Get the version
15 | [string]$version = $xml.Project.PropertyGroup.VersionPrefix
16 | $version = $version.Trim()
17 |
18 | #Get the suffix
19 | [string]$suffix = $xml.Project.PropertyGroup.VersionSuffix
20 | $suffix = $suffix.Trim()
21 |
22 | #Setting task variable $CurrentVersion (used for VSTS)
23 | Write-Host "##vso[task.setvariable variable=CurrentVersion]$version"
24 |
25 | #Setting task variable $CurrentVersion (used for VSTS)
26 | Write-Host "##vso[task.setvariable variable=CurrentSuffix]$suffix"
27 |
28 | #go back to the original directory
29 | Pop-Location
30 |
--------------------------------------------------------------------------------
/build/UpdateVersion.ps1:
--------------------------------------------------------------------------------
1 | #set the next two variables or get them from an Invoke-Expression, the rest should work automatically.
2 | Param(
3 | [string]$newVersion,
4 | [string]$suffix
5 | )
6 |
7 | #Go to src (version is not relevant to test projects)
8 | Push-Location $PsScriptRoot\..\src
9 |
10 | if (Test-Path ..\src\firely-net-common.props -PathType leaf)
11 | {
12 | $propFile = "..\src\firely-net-common.props"
13 | }
14 | else
15 | {
16 | $propFile = "..\src\fhir-net-common.props" # fallback to old name
17 | }
18 |
19 | $xml = [xml](get-content $propFile)
20 |
21 | # newVersion is not set, so getting it from the fhir-net-api.props
22 | If ([string]::IsNullOrEmpty($newVersion))
23 | {
24 | #Get the version (without suffix)
25 | $newVersion = $xml.Project.PropertyGroup.VersionPrefix
26 | }
27 |
28 | #Get the existing suffix
29 | [string] $oldSuffix = $xml.Project.PropertyGroup.VersionSuffix
30 | $oldSuffix = $oldSuffix.Trim()
31 |
32 | # when the suffix is not alpha (probably beta), it cannot be overriden by the parameter
33 | if (!$oldSuffix.StartsWith("alpha") -or [string]::IsNullOrEmpty($oldSuffix))
34 | {
35 | $suffix = $oldSuffix
36 | }
37 |
38 | Write-Host "Replacing version information with version: [$newVersion] suffix: [$suffix]"
39 |
40 | #Replacing the version and suffix
41 | (Get-Content $propFile) |
42 | Foreach-Object { $_ `
43 | -replace ".*", "$newVersion" `
44 | -replace ".*", "$suffix" `
45 | } |
46 | Set-Content $propFile
47 |
48 | #go back to the original directory
49 | Pop-Location
50 |
--------------------------------------------------------------------------------
/build/build-variables.yml:
--------------------------------------------------------------------------------
1 | # Repo: FirelyTeam/firely-net-common
2 | # File: build/build-variables.yml
3 | # Variables used during builds.
4 |
5 | variables:
6 | NET_CORE_SDK: 6.0.x
7 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
8 | TEST_TARGETFRAMEWORK: net6.0
9 | buildConfiguration: Release
--------------------------------------------------------------------------------
/build/pipeline-variables.yml:
--------------------------------------------------------------------------------
1 | # Repo: FirelyTeam/firely-net-common
2 | # File: build/pipeline-variables.yml
3 | # Variables used during the whole pipeline.
4 |
5 | variables:
6 | isTagBranch: $[startswith(variables['Build.SourceBranch'], 'refs/tags/v')]
--------------------------------------------------------------------------------
/build/templates/apply-versioning-steps-template.yml:
--------------------------------------------------------------------------------
1 | # Repo: FirelyTeam/firely-net-common
2 | # File: build/templates/apply-versioning-steps-template.yml
3 |
4 | steps:
5 | - task: PowerShell@2
6 | displayName: Retrieve current version
7 | inputs:
8 | targetType: filePath
9 | filePath: $(Build.SourcesDirectory)/build/RetrieveVersion.ps1
10 | arguments: -propFile $(Build.SourcesDirectory)/src/firely-net-common.props
11 | - powershell: |
12 | if ($Env:isTagBranch -eq $false)
13 | {
14 | # append a build number when we are not releasing
15 | Write-Host "##vso[task.setvariable variable=CurrentSuffix]$Env:CurrentSuffix-$Env:BUILD_BUILDNUMBER"
16 | }
17 | displayName: 'Setting suffix'
18 |
19 | - task: PowerShell@2
20 | displayName: Setting version for common projects
21 | inputs:
22 | targetType: filePath
23 | filePath: $(Build.SourcesDirectory)/build/UpdateVersion.ps1
24 | arguments: -propFile $(Build.SourcesDirectory)/common/src/firely-net-common.props -newVersion $(CurrentVersion) -suffix "$(CurrentSuffix)"
25 |
--------------------------------------------------------------------------------
/build/templates/sign-dlls-template.yml:
--------------------------------------------------------------------------------
1 | # Repo: FirelyTeam/firely-net-common
2 | # File: build/templates/signing-dlls-template-template.yml
3 |
4 | steps:
5 | - task: DownloadSecureFile@1
6 | displayName: Download Signing key file
7 | inputs:
8 | secureFile: 47f5a9d4-7009-4fe1-9cb2-c0d6122ded23
9 | retryCount:
10 | condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # not a PR
11 | - task: CopyFiles@2
12 | displayName: Copy key file to $(Build.SourcesDirectory)/src
13 | inputs:
14 | SourceFolder: $(Agent.TempDirectory)
15 | Contents: FhirNetApi.snk
16 | TargetFolder: $(Build.SourcesDirectory)/src
17 | condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # not a PR
18 | - powershell: |
19 | $commonfiles = Get-ChildItem -Path $(Build.SourcesDirectory)\src\Hl7.Fhir*\bin\Release\*\Hl7.Fhir*.dll -Exclude Hl7.Fhir*Tests
20 |
21 | Write-Verbose "Last exitcode before signing: $lastexitcode"
22 | foreach ($file in ($commonfiles))
23 | {
24 | Write-Verbose "Signing file: $file"
25 |
26 | & '$(Build.SourcesDirectory)\build\tools\sn.exe' -R $file $(Build.SourcesDirectory)\src\FhirNetApi.snk
27 | Write-Verbose "Last exitcode after signing file: $lastexitcode"
28 | }
29 | Write-Verbose "Last exitcode after signing all files: $lastexitcode"
30 | # suppress exitcode
31 | if ($lastexitcode -lt 2) { $global:lastexitcode = 0 }
32 | displayName: Signing the dlls
33 | name: signing
34 | condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # not a PR
35 |
36 |
--------------------------------------------------------------------------------
/build/templates/test-job-template.yml:
--------------------------------------------------------------------------------
1 | # Repo: FirelyTeam/firely-net-common
2 | # File: build/templates/test-job-template.yml
3 | parameters:
4 | - name: testRunTitle
5 | default: 'Test'
6 | - name: projects
7 |
8 | steps:
9 | - task: UseDotNet@2
10 | displayName: 'Use .NET Core sdk $(NET_CORE_SDK)'
11 | inputs:
12 | version: $(NET_CORE_SDK)
13 | - task: DownloadPipelineArtifact@2
14 | inputs:
15 | displayName: Download Build artifacts
16 | artifact: 'TestBuild'
17 | path: $(System.DefaultWorkingDirectory)/TestBuild
18 |
19 | - task: DotNetCoreCLI@2
20 | displayName: Running unit tests
21 | inputs:
22 | command: test
23 | projects: ${{ parameters.projects }}
24 | arguments: '-f $(TEST_TARGETFRAMEWORK) --filter TestCategory!=IntegrationTest&TestCategory!=FhirClient --collect "Code coverage"'
25 | testRunTitle: ${{ parameters.testRunTitle }}
--------------------------------------------------------------------------------
/build/tools/sn.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FirelyTeam/firely-net-common/6a89ed0ecf01033e6d3a70da9bfc90c6f0ba4d08/build/tools/sn.exe
--------------------------------------------------------------------------------
/clean.bat:
--------------------------------------------------------------------------------
1 | msbuild Hl7.Fhir.Common.sln /t:clean /v:minimal
2 |
--------------------------------------------------------------------------------
/contributors.md:
--------------------------------------------------------------------------------
1 | ## Contributors
2 |
3 | This library was a collective effort by the following developers:
4 |
5 | * Brian Postlethwaite (Telstra Health)
6 | * Ewout Kramer (Firely)
7 | * Marten Smits (Firely)
8 | * Christiaan Knaap (Firely)
9 | * Martijn Harthoorn (Firely)
10 | * Michel Rutten (Firely)
11 | * Marco Visser (Firely)
12 | * George Stoain (Endava)
13 | * Tilo Christ (Siemens)
14 | * Henley Devereux (Artisan Technology Group)
15 | * Kenneth Myhra (Kufu)
16 |
17 |
18 | HSCIC (NHS Digital) for their financial support
19 |
--------------------------------------------------------------------------------
/icon-firely-sdk-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FirelyTeam/firely-net-common/6a89ed0ecf01033e6d3a70da9bfc90c6f0ba4d08/icon-firely-sdk-128.png
--------------------------------------------------------------------------------
/lib/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FirelyTeam/firely-net-common/6a89ed0ecf01033e6d3a70da9bfc90c6f0ba4d08/lib/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
--------------------------------------------------------------------------------
/pack.bat:
--------------------------------------------------------------------------------
1 | msbuild /t:clean /p:configuration=release %*
2 | msbuild /t:restore /p:configuration=release %*
3 | msbuild /t:build,pack /p:configuration=release %*
4 |
--------------------------------------------------------------------------------
/src/Benchmarks/Benchmarks.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net6.0
6 | Benchmarks
7 | Firely.Sdk.Benchmarks.Common
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | PreserveNewest
18 |
19 |
20 | PreserveNewest
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/Benchmarks/Program.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Running;
2 |
3 | namespace Firely.Sdk.Benchmarks.Common
4 | {
5 | public class Program
6 | {
7 | public static void Main(string[] args)
8 | {
9 | _ = BenchmarkRunner.Run();
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Benchmarks/SerializationBenchmarks.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Attributes;
2 | using Hl7.Fhir.ElementModel;
3 | using Hl7.Fhir.Model;
4 | using Hl7.Fhir.Serialization;
5 | using Hl7.Fhir.Utility;
6 | using System.IO;
7 | using System.Text.Json;
8 |
9 | namespace Firely.Sdk.Benchmarks.Common
10 | {
11 | [MemoryDiagnoser]
12 | public class SerializationBenchmarks
13 | {
14 | internal TestPatient Patient;
15 | JsonSerializerOptions Options;
16 | FhirXmlPocoSerializer XmlSerializer;
17 |
18 |
19 | [GlobalSetup]
20 | public void BenchmarkSetup()
21 | {
22 | var filename = Path.Combine("TestData", "fp-test-patient.json");
23 | var data = File.ReadAllText(filename);
24 | // For now, deserialize with the existing deserializer, until we have completed
25 | // the dynamicserializer too.
26 | Patient = TypedSerialization.ToPoco(FhirJsonNode.Parse(data));
27 | Options = new JsonSerializerOptions().ForFhir(typeof(TestPatient).Assembly);
28 | XmlSerializer = new FhirXmlPocoSerializer(Hl7.Fhir.Specification.FhirRelease.STU3);
29 | }
30 |
31 | [Benchmark]
32 | public string JsonDictionarySerializer()
33 | {
34 | return JsonSerializer.Serialize(Patient, Options);
35 | }
36 |
37 | [Benchmark]
38 | public string XmlDictionarySerializer()
39 | {
40 | return SerializationUtil.WriteXmlToString(Patient, (o, w) => XmlSerializer.Serialize(o, w));
41 | }
42 |
43 | [Benchmark]
44 | public string TypedElementSerializerJson()
45 | {
46 | return TypedSerialization.ToTypedElement(Patient).ToJson();
47 | }
48 |
49 | [Benchmark]
50 | public string TypedElementSerializerXml()
51 | {
52 | return TypedSerialization.ToTypedElement(Patient).ToXml();
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/FhirNetApi.publickey:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FirelyTeam/firely-net-common/6a89ed0ecf01033e6d3a70da9bfc90c6f0ba4d08/src/FhirNetApi.publickey
--------------------------------------------------------------------------------
/src/Hl7.Fhir.ElementModel/Adapters/SourceNodeToTypedElementAdapter.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, Firely (info@fire.ly) and contributors
3 | * See the file CONTRIBUTORS for details.
4 | *
5 | * This file is licensed under the BSD 3-Clause license
6 | * available at https://raw.githubusercontent.com/FirelyTeam/firely-net-sdk/master/LICENSE
7 | */
8 |
9 | using System;
10 | using System.Collections.Generic;
11 | using System.Linq;
12 | using Hl7.Fhir.Specification;
13 | using Hl7.Fhir.Utility;
14 |
15 | namespace Hl7.Fhir.ElementModel.Adapters
16 | {
17 | internal class SourceNodeToTypedElementAdapter : ITypedElement, IAnnotated, IExceptionSource
18 | {
19 | public readonly ISourceNode Current;
20 |
21 | public SourceNodeToTypedElementAdapter(ISourceNode node)
22 | {
23 | Current = node ?? throw Error.ArgumentNull(nameof(node));
24 |
25 | if (node is IExceptionSource ies && ies.ExceptionHandler == null)
26 | ies.ExceptionHandler = (o, a) => ExceptionHandler.NotifyOrThrow(o, a);
27 | }
28 |
29 | private SourceNodeToTypedElementAdapter(SourceNodeToTypedElementAdapter parent, ISourceNode sourceNode)
30 | {
31 | this.Current = sourceNode;
32 | this.ExceptionHandler = parent.ExceptionHandler;
33 | }
34 |
35 | public ExceptionNotificationHandler ExceptionHandler { get; set; }
36 |
37 | public string Name => Current.Name;
38 |
39 | public string InstanceType => Current.GetResourceTypeIndicator();
40 |
41 | public object Value => Current.Text;
42 |
43 | public string Location => Current.Location;
44 |
45 | public IElementDefinitionSummary Definition => null;
46 |
47 | public IEnumerable Children(string name) =>
48 | Current.Children(name).Select(c => new SourceNodeToTypedElementAdapter(this, c));
49 |
50 | IEnumerable