<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Forward and backward compatibility design techniques applying the HL7 FHIR standard</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Igor</forename><surname>Bossenko</surname></persName>
							<email>igor.bossenko@taltech.ee</email>
							<affiliation key="aff0">
								<orgName type="department">Department of Health Technologies</orgName>
								<orgName type="institution">TalTech</orgName>
								<address>
									<addrLine>Akadeemia Str 15A</addrLine>
									<postCode>12618</postCode>
									<settlement>Tallinn</settlement>
									<country key="EE">Estonia</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Gunnar</forename><surname>Piho</surname></persName>
							<email>gunnar.piho@taltech.ee</email>
							<affiliation key="aff1">
								<orgName type="department">Department of Software Science</orgName>
								<orgName type="institution">TalTech</orgName>
								<address>
									<addrLine>Akadeemia Str 15A</addrLine>
									<postCode>12618</postCode>
									<settlement>Tallinn</settlement>
									<country key="EE">Estonia</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Peeter</forename><surname>Ross</surname></persName>
							<email>peeter.ross@taltech.ee</email>
							<affiliation key="aff0">
								<orgName type="department">Department of Health Technologies</orgName>
								<orgName type="institution">TalTech</orgName>
								<address>
									<addrLine>Akadeemia Str 15A</addrLine>
									<postCode>12618</postCode>
									<settlement>Tallinn</settlement>
									<country key="EE">Estonia</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Forward and backward compatibility design techniques applying the HL7 FHIR standard</title>
					</analytic>
					<monogr>
						<idno type="ISSN">1613-0073</idno>
					</monogr>
					<idno type="MD5">AD156AE73847BCCC4B151523102F1EAE</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T10:21+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>HL7 FHIR</term>
					<term>EHR</term>
					<term>electronic health record</term>
					<term>interoperability</term>
					<term>compatibility design techniques</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Interoperability issues are acute not only in heterogeneous environments where different standards are used, but also in homogeneous environments where the same standard is used differently for individual organisations. Interoperability is also important within one organisation and especially arises when transferring systems from one version of the standard to another. This article discusses the compatibility of the various versions of the HL7 FHIR standard, focusing on the current R4 version at the time of writing. It also describes the individual features of earlier versions of the HL7 FHIR standard. The article analyses the principles of forward and backward compatibility and proposes recommendations for how to develop a sustainable and balanced interoperability system.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Resource development is evolutionary. It undergoes several specification reviews and community connectathons (community testing) and feedback from early implementers. As a result, each resource is assigned a level of maturity according to the FMM (FHIR Maturity Model) <ref type="bibr" target="#b3">[4]</ref> scale, which in turn is based on the CMMI <ref type="bibr" target="#b4">[5]</ref> scale. FMM maturity levels are numbered from 0 to 5. For example, maturity level 0 means a 'draft' that was recently published, and level 5 becomes a resource that has been published in at least two releases with a maturity level other than zero and has been implemented in at least five independent production systems in more than one country. The final level is 'normative' or stable. Maturity levels are directly related to the stability of resources: the higher the number the more stable the resource and the lower the chance of non-backward changes occurring.</p><p>Forward compatibility means that content compatible with the old version of the standard is also compatible with the new version. For normative resources, FHIR seeks to ensure, but does not guarantee, the compatibility of resources. Backward compatibility means that instances created against future versions of a specification work with older versions of the specification. The development of the resource information model is based on the '80/20' <ref type="bibr" target="#b5">[6]</ref> principle of reuse and composability -focusing on 20% of the requirements that satisfy 80% of the interoperability needs. For this purpose, resources are created in such a way that they meet the general or common data requirements of many use cases in order to avoid the proliferation of numerous, overlapping and redundant resources. Use cases not covered by the base resource can be implemented using extensions (FHIR extensions <ref type="bibr" target="#b6">[7]</ref>) and customisation (FHIR profiles <ref type="bibr" target="#b7">[8]</ref>).</p><p>FHIR extensions are a fundamental part of FHIR architecture. Each element expanded according to the needs. Each extension can be repeated an unlimited number of times. With the extension mechanism, it is possible to solve every existing and potential use case. Where extensions allow new elements to be added, profiles regulate the use of resources in a specific user manual. FHIR profiles describe what specific elements, including extensions, must be used, whether they are mandatory and what terminology and additional restrictions must be used. The FHIR profile allows you to describe the exact rules for, say, the transmission of blood pressure data, the admission of an unknown patient to the emergency department or the registration of a death.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1.">Related works</head><p>The evolution of services requires the provision of support, the creation of new features, which leads to many versions that need to be maintained <ref type="bibr" target="#b8">[9]</ref>. Service versioning typically means versioning the implementation or an interface of a service <ref type="bibr" target="#b9">[10]</ref>  <ref type="bibr" target="#b10">[11]</ref>. In the context of service evolution, which regards the integration between customers and providers, the versioning of the service interface is often addressed, particularly the service interface description. Since the FHIR standard uses the latest web standards <ref type="bibr" target="#b0">[1]</ref> -such as web services and REST, the most interesting relevant work is in the field of web services. Many authors over the decades have analysed versioning in the software design, and in Web Services and Service Oriented Architecture (SOA) particularly. The research identifies forward <ref type="bibr" target="#b11">[12]</ref> and backward <ref type="bibr" target="#b12">[13]</ref> compatibility service design techniques that facilitate a good balance between requirements in multiple environments. Often, providers publish new versions with release notes that should help clients apply changes (Google, Amazon, etc.). Typically, release notes describe the explicit changes but fail to identify how they affect the entire service and compatibility with previous versions <ref type="bibr" target="#b13">[14]</ref>. Service change management requires mechanism for the identification and classification of changes and mechanisms for the resource transformations between versions. These topics highlighted in different works, for accurate recognition of changes <ref type="bibr" target="#b13">[14]</ref> and usage oriented compatibility assessments <ref type="bibr" target="#b14">[15]</ref>  <ref type="bibr" target="#b15">[16]</ref> . Compatibility is central issue of evolution, because it provides valuable information regarding the changes in the services <ref type="bibr" target="#b9">[10]</ref>. Several works describe solutions for compatibility issues, such as version-aware approach for Web Service Client Application <ref type="bibr" target="#b16">[17]</ref>, framework that supports the evolution of services <ref type="bibr" target="#b17">[18]</ref> and backward compatibility study <ref type="bibr" target="#b18">[19]</ref>. In summary, despite attempts to create a universal approach for service versioning, service stakeholders lack a proper mechanism to recognize changes and their impact on evolving services quickly.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.2.">Challenges of implementing changes in HL7 FHIR</head><p>The FHIR information model, along with extensions and profiling, allows the creation of the necessary implementation guides for virtually every case in health care. This flexibility has obvious advantages and disadvantages. On the one hand, there is the possibility for rapid adoption in the changing world of health care and the provision of the most suitable information services for healthcare companies. On the other hand, constant change leads to a situation where we encounter a lot of data created on the basis of different versions of FHIR standards and profiles and their data differ to one degree or another. The multiplicity of versions raises several questions:</p><p>• Backward-compatibility ensures that consumers using old services need not be upgraded to use the modified service. That is, when service providers upgrade their services to offer the latest functionalities, service consumers need not be aware of the changes and can continue to use the services as before. On the other hand, forward-compatibility guarantees that new consumers need not be downgraded to work with an old service. That is, when service consumers deploy a new client application that conforms to the modified Web service interface, it should be able to work with the old Web service as well, without having to downgrade <ref type="bibr" target="#b11">[12]</ref>.</p><p>• How should 'old' data, i.e. data created according to previous standards, be processed in software that only supports the last valid version of the standard? How should deleted attributes, changed cardinality, expired concepts in terminology, etc. be handled?</p><p>• How should software be designed so that it can function in an environment where a new standard has been introduced, about which it knows nothing at the time of design? How should the software handle new elements still unknown to it, the disappearance of elements, new concepts in terminology, etc.?</p><p>• Can software that create data using different versions of the standard work in one information space? Do they cause one to another problems with continuous cross-version conversions?</p><p>Further work will try to answer these questions.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.3.">Methodology</head><p>In this paper, forward and backward compatibility design methods and individual properties in the context of the HL7 FHIR standard are compared. In analysis, the SWOT methodology is used.</p><p>The SWOT methodology evaluates various parameters of the solution: strengths, weaknesses, opportunities and threats.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Design techniques and their application</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1.">Definitions</head><p>The FHIR specification thoroughly describes the principles of change management and versioning <ref type="bibr" target="#b19">[20]</ref>. Based on this description, the following can be argued:</p><p>• Versions are forward compatible if the content created with the old standard is also compatible with the new version of the standard.</p><p>• Versions are not forward compatible if at least one of the requirements is not satisfied.</p><p>• Backward compatibility means that instances created against future versions of a specification will work with older versions of the specification.</p><p>• Versions are not backward compatible if at least one of the requirements is not satisfied.</p><p>• Versions are forward and backward compatible when both forward and backward compatibility conditions apply simultaneously.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.">Forward-compatible solutions</head><p>Forward compatibility can easily be achieved by the developer of the standard if the principles of the forward-compatible solution are followed. In the new version of the standard for the forward-compatible solution:</p><p>1. all elements that existed in the previous version are present;</p><p>2. new added elements are not mandatory;</p><p>3. data types are the same or have a wider range; Consider that in version X we have resource R and in version X+1 the same resource is updated to version R' with the data structures, as illustrated in Figure <ref type="figure" target="#fig_1">1</ref>. The most important factor is the decision of the developer of the standard on whether to support the principle of compatibility or not. If compatibility is supported, it makes sense to develop checklists to use for each modified resource, verifying that all compatibility principles have been implemented.  The developers of the FHIR standard try to adhere to the principle of compatibility with normative resources <ref type="bibr" target="#b20">[21]</ref>. This is an indicative way of developing a standard because it eliminates many of the problems inherent in non-forward-compatible solutions. However, this doesn't guarantee that all old systems will interact with future systems.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3.">Non-forward-compatible solutions</head><p>If the developer of the standard does not proceed from the compatibility principle, the content created by the old standard will not be compatible with the new version by default. In this case, two software, one with the old version and the other with the new version, start creating conflicting content, which leads to the failure of one application or another. This problem is easiest to solve organisationally, requiring the transition of all software to a new version from a certain moment. However, with the abundance of software and varying lengths of the release cycles, this is very problematic, if not impossible.</p><p>On the other hand, data that were created with an earlier version and that no longer meet the new standard will remain in the data repository. This leads to the idea that every implementer should support not only one version of the latest standard, but all versions of the standard supported by the data repository keeper. It is widespread practice to support the last two or three versions of the standard and to archive earlier versions by preventing the adoption of data in formats which are too old.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3.1.">Data conversion</head><p>Supporting two or three versions of each software significantly increases the price of the software being developed and the associated support price. In addition, archived versions are emerging, i.e. version support that may not be available on new software. Consider that the patient has several diagnoses transmitted to the data repository on an accrual basis using different versions of DSTU R2 (1.0), STU R3 (3.0) and R4 (4.0) in force at the time. Consider that the data repository keeper is archiving version DSTU R2, that is, new software no longer needs R2 support. However, the patient diagnoses query returns all resources, including those that were created in archived versions. The sample query illustrated in the following script asks for all patient 'P1' diagnoses.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>GET / f h i r / C o n d i t i o n ? p a t i e n t =P1</head><p>The answer is a bundle, where the Profile section specifies the version of the resource, as illustrated in Listing 1.</p><p>Body : { " r e s o u r c e T y p e " : " B u n d l e " , " t y p e " : " s e a r c h s e t " , " t o t a l " : 3 , " e n t r y " : [ { " f u l l U r l " : " h t t p s : In this situation, all resource entries must be converted from version R2 to a newer version; in our example, preferably to the latest version R4. This conversion requires precise instructions on how to perform said conversion. The following situations must be considered:</p><p>1. The element in R2 is removed from the new version -in this case, in the new version, this element must be represented as an extension.</p><p>2. The data type of the element changes between the two versions -a formula is drawn up to convert the data and the original element is presented as an extension.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">The new version of ValueSet has no value from version R2</head><p>-a map of the concepts (Con-ceptMap) must be composed between versions R2 and R4.</p><p>4. In the new version, a new mandatory element is added -it is necessary to make a formula for how the value of the new element can be calculated from the data in R2.</p><p>The fact that the data in the versions withdrawn from use, as a rule, are associated with completed operations, narrowing the required number of mappings, should be taken into consideration. In a situation where it is not possible to create a formula or mapping table, or where the clinical value may change as a result of this activity, special values such as 'unknown' or 'data-in-error' must be added to the list to avoid changing the clinical content. Such conversion can be done either using the FHIR server custom adapter, which would convert R2 resources to R4 based on the described mappings, or by creating a physical entry in the data repository with reference to the newer version profile. Creating such inter-versioning mappings for resources and terminology is a serious analytical task that deserves its own article.</p><p>The solution with dynamical transformation is preferred, as it allows you to easily repeat activities without changing data, ensuring the best quality. It is important to mention that the resource conversion between versions is not part of the FHIR specification, has no agreed syntax and is not supported by any FHIR server by default. On the other hand, for large amounts of data, continuous conversion can place a heavy load on the CPU.</p><p>The same or other adapters can help make permanent transformations in data. In this case, a new version of the resource with a reference to the new standard is generated in the data repository. In this regard, it is important to proceed from the principle of not changing the original data, including, as a result of the transformation, to create a new version of the resource, with the original version remaining unchanged. An alternative is a combined solution, where for a sufficiently long period of time (6-12 months), an dynamical converter is used. After which, in the absence of any claim to clinical content, a single physical conversion from the old standard to the new one is carried out using the same adapter. The converter is then withdrawn from use and the old standard is archived.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Backward-compatible solutions</head><p>For a backward-compatible solution, the old application must be able to process copies of the new version without knowing the changes. Such a situation cannot be guaranteed by the FHIR specification, nor by the local standard developer. Software design and readiness to adopt the new version of the standard play a bigger role. A software developer can develop systems that follow backward compatibility strategies and increase their interoperability capabilities <ref type="bibr" target="#b21">[22]</ref>. In the simplest case, the FHIR specification describes a series of actions that end-applications must use to increase backward compatibility when processing <ref type="bibr" target="#b22">[23]</ref> a resource generated with the new standard:</p><p>1. Ignore unknown (defined in the new version) elements 2. Ignore references to an unknown resource; 3. Ignore unknown codes 4. Ignore unknown search criteria 5. Respond within the prescribed error codes when addressing an unknown URL Unfortunately, in reality, few implementers observe these rules due to the technical limitations of the software or the potential clinical risk that arises from ignoring certain elements. Another considerable alternative is the use of narrative. Narrative <ref type="bibr" target="#b23">[24]</ref> is a human-readable summary of the resource. In a situation where the oldest software is not able to process a resource created according to a newer standard, it:</p><p>1. does not focus on processing the content part and displays only the narrative or; 2. combines the processing of the elements it understands and the displaying of the narrative.</p><p>In these cases, the application must be designed to identify the Backward Compatibility problem and display the narrative. The sample query is as follows:</p><p>GET / O b s e r v a t i o n / example A c c e p t : a p p l i c a t i o n / f h i r + j s o n ; f h i r V e r s i o n = 3 . 0 A sample response to this is illustrated in Listing 2.</p><p>Content −Type : a p p l i c a t i o n / f h i r + j s o n ; f h i r V e r s i o n = 3 . 0 { " r e s o u r c e T y p e " : " O b s e r v a t i o n " , " i d " : " example " , " t e x t " : { " s t a t u s " : " g e n e r a t e d " , " d i v " : " &lt;p&gt;&lt;b&gt; i d &lt; / b &gt; : example &lt; / p&gt; &lt;p&gt;&lt;b&gt; s t a t u s &lt; / b &gt; : f i n a l &lt; / p&gt; &lt;p&gt;&lt;b&gt; code &lt; / b &gt; : Body Weight &lt; / p&gt; &lt;p&gt;&lt;b&gt; s u b j e c t &lt; / b &gt; : &lt;a &gt; P a t i e n t / example &lt; / a &gt; &lt;/ p&gt; &lt;p&gt;&lt;b&gt; e f f e c t i v e &lt; / b &gt; : 2 8 / 0 3 / 2 0 1 6 &lt; / p&gt; &lt;p&gt;&lt;b&gt; v a l u e &lt; / b &gt; : 1 0 0 kg &lt; / p&gt; " } , " s t a t u s " : " f i n a l " , " c o d e " : { " c o d i n g " : [ { " s y s t e m " : " h t t p : / / l o i n c . o r g " , " c o d e " : " 29463 −7 " , " d i s p l a y " : " Body Weight " } ] } , " s u b j e c t " : { " r e f e r e n c e " : " P a t i e n t / example " } , " e f f e c t i v e D a t e T i m e " : " 2016 −03 −28 " , " v a l u e Q u a n t i t y " : { " v a l u e " : 1 0 0 , " u n i t " : " kg " , " s y s t e m " : " h t t p : / / u n i t s o f m e a s u r e . o r g " , " c o d e " : " kg " } } Listing 2: HL7 FHIR Narrative example and the related visual presentation in any web browser is as follows: id : 𝑒𝑥𝑎𝑚𝑝𝑙𝑒 status : 𝑓 𝑖𝑛𝑎𝑙 code : 𝐵𝑜𝑑𝑦𝑊 𝑒𝑖𝑔ℎ𝑡 subject : 𝑃 𝑎𝑡𝑖𝑒𝑛𝑡/𝑒𝑥𝑎𝑚𝑝𝑙𝑒 effective : 28 − 03 − 2016 value: 100 kg Health Information System records are often subject to commercial and legal requirements for their storage, sometimes up to 100 years, which can lead to a situation in which formalised data is not processed and is not displayed in all applications and devices for the required period of time. In order to ensure this kind of backward compatibility for each FHIR producer, it is reasonable to think about a narrative generation system that takes into account the peculiarities of local medicine, legalisation and jurisdiction and generates a narrative by which resources are received on the FHIR server if the narrative is not predefined by the record creator.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Use of extensions in applications with backward and forward compatibility</head><p>The processing of unknown elements must be considered as a special case. Unknown elements can occur when elements are removed, renamed or added in a newer version of a specification. Some of approaches enforce forward compatibility through extensions <ref type="bibr" target="#b24">[25]</ref>. According to the FHIR specification, each element has an extension URL that uniquely identifies said element. An extension URL can be automatically derived in the form:</p><formula xml:id="formula_0">h t t p : / / h l 7 . o r g / f h i r / [ v e</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>r s i o n ] / S t r u c t u r e D e f i n i t i o n / e x t e n s i o n −[ P a t h ]</head><p>In this case, the FHIR server could return the elements changed between versions as extensions. The example below demonstrates this approach on the example of an animal patient, where it was possible to determine animal characteristics in the STU3 version. GET / P a t i e n t / a n i m a l A c c e p t : a p p l i c a t i o n / f h i r + j s o n ; f h i r V e r s i o n = 3 . 0 This returns the resource with elements 'animal.species' and 'animal.genderStatus' as shown in Listing 3 { " r e s o u r c e T y p e " : " P a t i e n t " , " i d " : " a n i m a l " , " a c t i v e " : t r u e , " name " : [ { " u s e " : " u s u a l " , " g i v e n " : [ " K e n z i " ] } ] , " a n i m a l " : { " s p e c i e s " : { " c o d i n g " : [ { " s y s t e m " : " h t t p : / / h l 7 . o r g / f h i r / a n i m a l − s p e c i e s " , " c o d e " : " c a n i s l f " , " d i s p l a y " : " Dog " } ] } , " g e n d e r S t a t u s " : { " c o d i n g " : [ { " s y s t e m " : " h t t p : / / h l 7 . o r g / f h i r / a n i m a l − g e n d e r s t a t u s " , " c o d e " : " n e u t e r e d " } ] } } } Listing 3: FHIR R3 Animal species However, the same query in the next release R4... GET / P a t i e n t / a n i m a l A c c e p t : a p p l i c a t i o n / f h i r + j s o n ; f h i r V e r s i o n = 4 . 0 ...returns resource elements (Listing 4) as animal-species and animal-genderStatus extensions, since these elements were removed from the standard in R4.</p><p>{ " r e s o u r c e T y p e " : " P a t i e n t " , " i d " : " a n i m a l " , " a c t i v e " : t r u e , " name " : [ { " u s e " : " u s u a l " , " g i v e n " : [ " K e n z i " ] } ] , " e x t e n s i o n " : [ { " u r l " : " h t t p : / / h l 7 . o r g / f h i r / 3 . 0 / S t r u c t u r e D e f i n i t i o n / e x t e n s i o n − P a t i e n t . a n i m a l . s p e c i e s " , " v a l u e C o d e a b l e C o n c e p t " : { " c o d i n g " : [ { " s y s t e m " : " h t t p : / / h l 7 . o r g / f h i r / a n i m a l − s p e c i e s " , " c o d e " : " c a n i s l f " , " d i s p l a y " : " Dog " } ] } } ] , " e x t e n s i o n " : [ { " u r l " : " h t t p : / / h l 7 . o r g / f h i r / 3 . 0 / S t r u c t u r e D e f i n i t i o n / e x t e n s i o n − P a t i e n t . a n i m a l . g e n d e r s t a t u s " , " v a l u e C o d e a b l e C o n c e p t " : { " c o d i n g " : [ { " s y s t e m " : " h t t p : / / h l 7 . o r g / f h i r / a n i m a l − g e n d e r s t a t u s " , " c o d e " : " n e u t e r e d " } ] } } ] } Listing 4: FHIR R4 Animal species As you can see from the example, in the FHIR resource of normative content, a developer who creates an application in accordance with this Standard may encounter extensions they may not have considered, which is why well-designed applications that display all unknown extensions ensure better clinical quality and insight into the data.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Conclusion</head><p>Although versioning of web servers, in general, is fairly well researched, versioning in the FHIR standard is not covered in the scientific literature. The author considered the design principles of forward and backward compatibility and methods for solving problems in particular cases. Several solutions are aggregated in Table <ref type="table" target="#tab_1">2</ref>. A good standard developer creates implementation guides with both forward and backward compatibility principles in mind. The FHIR specification and current study prescribes a series of forward and backward compatibility rules.</p><p>Each implementer should create a checklist with the forward and backward compatibility rules specified in the FHIR specification and upgrade them based on their own deployment experience and that of others. If backward compatibility is difficult to achieve, the developer of the standard should at least ensure that the forward compatibility of the standard. In the author's opinion, failure to ensure forward compatibility is equivalent with non-versioning or with a situation where there are no versioning principles or design. The FHIR specification does not solve all of the forward and backward compatibility issues mentioned, and given that at the time of writing the article, the share of normative resources was less than 10% of the total specification, every developer of the standard must take the versioning of the system design very seriously. On the other hand, it is equally important to enlighten educational services software developers about forward and backward compatibility, carry out FHIR Connecthatons in order to increase interoperability between versions and offer certification and require software developers to comply with it.</p><p>The FHIR specification describes quite a few measures that help ensure forward and backward compatibility. The FHIR extensions mechanism helps convert resources between versions if there is appropriate support on the FHIR server. In work proposed, converters allow the content of resources between versions to be transformed dynamically. The narrative ensures the readability of clinical content by a specialist even after decades have passed. Table <ref type="table" target="#tab_3">3</ref> describes the key aspects that need to be addressed in the field of forward and backward compatibility for each standard developer. This article is the first in its series and discusses the design principles that can be applied by the standard developer in their work. Further research should look at the following:</p><p>• The syntax describing transformations, which includes both conversion of resource elements and conversion of terminology concepts, is not standardised by FHIR and requires an article of its own.</p><p>• FHIR data retention logic and endpoint logic of FHIR servers, which handle different relics (e.g. R2 and R5) and serve responses using different headers, paths and even resources that were valid in the respective version. </p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>4 .</head><label>4</label><figDesc>cardinality is weaker, e.g. from mandatory [1..1] becomes optional [0..1]; 5. all values from the previous version are present in the related terminology list.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Figure 1 :</head><label>1</label><figDesc>Figure 1: Forward compatibility in HL7 FHIR resources</figDesc><graphic coords="5,89.29,84.19,416.69,104.08" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Listing 1 :</head><label>1</label><figDesc>/ / example . com / b a s e / C o n d i t i o n / 2 0 1 " , " r e s o u r c e " : { " r e s o u r c e T y p e " : " C o n d i t i o n " , " i d " : " 2 0 1 " , " meta " : { " l a s t U p d a t e d " : " 2013 −05 −25 T22 : 1 2 : 2 1 Z " " p r o f i l e " : [ " h t t p : / / h l 7 . o r g / f h i r / 1 . 0 / S t r u c t u r e D e f i n i t i o n / C o n d i t i o n " ] } , . . . } , { " f u l l U r l " : " h t t p s : / / example . com / b a s e / C o n d i t i o n / 3 0 1 " , " r e s o u r c e " : { " r e s o u r c e T y p e " : " C o n d i t i o n " , " i d " : " 3 0 1 " , " meta " : { " l a s t U p d a t e d " : " 2016 −06 −26 T22 : 1 2 : 2 1 Z " " p r o f i l e " : [ " h t t p : / / h l 7 . o r g / f h i r / 3 . 0 / S t r u c t u r e D e f i n i t i o n / C o n d i t i o n " ] } , . . . } , { " f u l l U r l " : " h t t p s : / / example . com / b a s e / C o n d i t i o n / 4 0 1 " , " r e s o u r c e " : { " r e s o u r c e T y p e " : " C o n d i t i o n " , " i d " : " 4 0 1 " , " meta " : { " l a s t U p d a t e d " : " 2019 −09 −29 T22 : 1 2 : 2 1 Z " " p r o f i l e " : [ " h t t p : / / h l 7 . o r g / f h i r / 4 . 0 / S t r u c t u r e D e f i n i t i o n / C o n d i t i o n " ] } , . . . } } Patient diagnoses query which returns data generated in three FHIR versions</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>Table 1</head><label>1</label><figDesc>Forward and non-forward compatible changes Change in the new version Forward Compatible Add new artifacts (resources, elements, operations) Yes Add new optional element in resource Yes Add new artifact to the Implementation Guide Yes Reduce cardinality, incl. an element becomes an optional</figDesc><table><row><cell>Yes</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_1"><head>Table 2 .</head><label>2</label><figDesc></figDesc><table /><note>2 summarize the guidelines for forward compatible changes.</note></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_2"><head>Table 2</head><label>2</label><figDesc>Comparison of design principles</figDesc><table><row><cell>Strengths</cell><cell>Weaknesses</cell></row><row><cell>Forward-compatible and backward-compatible</cell><cell>Non-backward compatible solutions</cell></row><row><cell>solutions</cell><cell></cell></row><row><cell>Forward compatible solutions</cell><cell></cell></row><row><cell>Opportunities</cell><cell>Threats</cell></row><row><cell>Backward-compatible solutions</cell><cell>Non-forward-compatible solutions</cell></row><row><cell></cell><cell>No versioning principles</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_3"><head>Table 3</head><label>3</label><figDesc>Most important aspects of forward and backward compatibility Store resources in transformed state Store resources in both received and transformed state Host multiple end-points for a variety of purposes scribed in adopting the FHIR standard for the National Health Service of Estonia. This work in the project 'ICT programme' was supported by the European Union through the European Social Fund.</figDesc><table><row><cell>Strengths</cell><cell>Weaknesses</cell></row><row><cell>Generate a narrative based on uniform rules on</cell><cell>Complexity of inter-version mappings of re-</cell></row><row><cell>the FHIR server to provide human-readable out-</cell><cell>sources and terminology</cell></row><row><cell>put</cell><cell></cell></row><row><cell>When storing resources, store the version of the</cell><cell>High server load, complexity and support cost</cell></row><row><cell>resource alongside the resource</cell><cell>for inter-version, dynamical resource converter</cell></row><row><cell></cell><cell>between versions</cell></row><row><cell>Store resources at least in the original/received</cell><cell>Ir-reversibility of on-demand transformations</cell></row><row><cell>form</cell><cell></cell></row><row><cell>Maintain forward compatibility of resources by</cell><cell></cell></row><row><cell>standard design</cell><cell></cell></row><row><cell>Opportunities</cell><cell>Threats</cell></row><row><cell>Maintain forward and backward conversions for</cell><cell>Changing of clinical meaning during inter-</cell></row><row><cell>the parts of resources that matter to the appli-</cell><cell>version transformation</cell></row><row><cell>cation</cell><cell></cell></row><row><cell>Dynamical resource converter between versions</cell><cell></cell></row><row><cell>On-demand data transformer from older version</cell><cell></cell></row><row><cell>to current version</cell><cell></cell></row></table></figure>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Acknowledgments</head><p>We thank the TEHIK (Health and Welfare Information Systems Centre, Estonia) https://www. tehik.ee/ and the Kodality https://www.kodality.com/ teams who validated the methods de-</p></div>
			</div>

			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Authors' contribution</head><p>I.B. designed the idea and wrote the manuscript with support from G.P. All authors contributed to the final version of the manuscript. G.P. and P.R. supervised the project.</p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<monogr>
		<author>
			<persName><surname>Hl7</surname></persName>
		</author>
		<ptr target="http://hl7.org/fhir/" />
		<title level="m">Fhir is a standard for health care data exchange</title>
				<imprint>
			<date type="published" when="2022-04-06">2022. 2022-04-06</date>
		</imprint>
	</monogr>
	<note>published by hl7®</note>
</biblStruct>

<biblStruct xml:id="b1">
	<monogr>
		<ptr target="https://build.fhir.org/history.html" />
		<title level="m">History -fhir</title>
				<imprint>
			<date type="published" when="2011">2011. 2022-04-03</date>
		</imprint>
	</monogr>
	<note>HL7</note>
</biblStruct>

<biblStruct xml:id="b2">
	<monogr>
		<author>
			<persName><surname>Hl7</surname></persName>
		</author>
		<ptr target="http://hl7.org/fhir/DSTU1/http.html#paging" />
		<title level="m">Fhir dstu1</title>
				<imprint>
			<date type="published" when="2011">2011. 2022-04-03</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<monogr>
		<author>
			<persName><surname>Hl7</surname></persName>
		</author>
		<ptr target="http://hl7.org/fhir/versions.html#maturity" />
		<title level="m">Maturity -fhir</title>
				<imprint>
			<date type="published" when="2011">2011. 2022-04-03</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">A history of the capability maturity model for software</title>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">C</forename><surname>Paulk</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">ASQ Software Quality Professional</title>
		<imprint>
			<biblScope unit="volume">12</biblScope>
			<biblScope unit="page" from="5" to="19" />
			<date type="published" when="2009">2009</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<monogr>
		<author>
			<persName><surname>Hl7</surname></persName>
		</author>
		<ptr target="https://www.hl7.org/fhir/overview-arch.html#principles" />
		<title level="m">Fhir overview -architects</title>
				<imprint>
			<date type="published" when="2011">2011. 2022-04-03</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<monogr>
		<author>
			<persName><surname>Hl7</surname></persName>
		</author>
		<ptr target="https://www.hl7.org/fhir/extensibility.html" />
		<title level="m">Extensibility -fhir</title>
				<imprint>
			<date type="published" when="2011">2011. 2022-04-03</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<monogr>
		<author>
			<persName><surname>Hl7</surname></persName>
		</author>
		<ptr target="https://www.hl7.org/fhir/profiling.html" />
		<title level="m">Profiling -fhir</title>
				<imprint>
			<date type="published" when="2011">2011. 2022-04-03</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">The challenges of service evolution</title>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">P</forename><surname>Papazoglou</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">International Conference on Advanced Information Systems Engineering</title>
				<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="2008">2008</date>
			<biblScope unit="page" from="1" to="15" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">Automatically determining compatibility of evolving services</title>
		<author>
			<persName><forename type="first">K</forename><surname>Becker</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Lopes</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><forename type="middle">S</forename><surname>Milojicic</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Pruyne</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Singhal</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">2008 IEEE International Conference on Web Services, IEEE</title>
				<imprint>
			<date type="published" when="2008">2008</date>
			<biblScope unit="page" from="161" to="168" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<analytic>
		<title level="a" type="main">Using an interface proxy to host versioned web services</title>
		<author>
			<persName><forename type="first">D</forename><surname>Frank</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Lam</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Fong</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Fang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Khangaonkar</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">IEEE International Conference on Services Computing</title>
				<imprint>
			<publisher>IEEE</publisher>
			<date type="published" when="2008">2008. 2008</date>
			<biblScope unit="volume">2</biblScope>
			<biblScope unit="page" from="325" to="332" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<monogr>
		<author>
			<persName><forename type="first">C</forename><surname>Armbruster</surname></persName>
		</author>
		<ptr target="https://chrisarmbruster.com/documents/design-for-evolution-white-paper.pdf" />
		<title level="m">Design for evolution</title>
				<imprint>
			<date type="published" when="1999">1999. 2022-04-03</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">A design technique for evolving web services</title>
		<author>
			<persName><forename type="first">P</forename><surname>Kaminski</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Litoiu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><surname>Müller</surname></persName>
		</author>
		<idno type="DOI">10.1145/1188966.1188997</idno>
		<ptr target="https://dl.acm.org/doi/abs/10.1145/1188966.1188997" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 2006 conference of the Center for Advanced Studies on Collaborative research</title>
				<meeting>the 2006 conference of the Center for Advanced Studies on Collaborative research</meeting>
		<imprint>
			<date type="published" when="2006">2006. 2022-04-03</date>
			<biblScope unit="page">23</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<analytic>
		<title level="a" type="main">An empirical study on web service evolution</title>
		<author>
			<persName><forename type="first">M</forename><surname>Fokaefs</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Mikhaiel</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Tsantalis</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Stroulia</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Lau</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">2011 IEEE International Conference on Web Services, IEEE</title>
				<imprint>
			<date type="published" when="2011">2011</date>
			<biblScope unit="page" from="49" to="56" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<monogr>
		<title level="m" type="main">Service versioning and compatibility at feature level</title>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">C</forename><surname>Yamashita</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2013">2013</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b15">
	<analytic>
		<title level="a" type="main">Measuring change impact based on usage profiles</title>
		<author>
			<persName><forename type="first">M</forename><surname>Yamashita</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Vollino</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Becker</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Galante</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">IEEE 19th International Conference on Web Services, IEEE</title>
				<imprint>
			<date type="published" when="2012">2012. 2012</date>
			<biblScope unit="page" from="226" to="233" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b16">
	<analytic>
		<title level="a" type="main">A version-aware approach for web service directory</title>
		<author>
			<persName><forename type="first">R</forename><surname>Fang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Lam</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Fong</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Frank</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Vignola</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Chen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Du</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">IEEE International Conference on Web Services (ICWS 2007)</title>
				<imprint>
			<publisher>IEEE</publisher>
			<date type="published" when="2007">2007</date>
			<biblScope unit="page" from="406" to="413" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b17">
	<analytic>
		<title level="a" type="main">A feature-based versioning approach for assessing service compatibility</title>
		<author>
			<persName><forename type="first">M</forename><surname>Yamashita</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Becker</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Galante</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Journal of Information and Data Management</title>
		<imprint>
			<biblScope unit="volume">3</biblScope>
			<biblScope unit="page" from="120" to="120" />
			<date type="published" when="2012">2012</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b18">
	<monogr>
		<author>
			<persName><forename type="first">M</forename><surname>Endrei</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Gaon</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Graham</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Hogg</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Mulholland</surname></persName>
		</author>
		<title level="m">Moving forward with web services backward compatibility</title>
				<imprint>
			<date type="published" when="2006">2006</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b19">
	<monogr>
		<ptr target="http://hl7.org/fhir/versions.html" />
		<title level="m">HL7, Fhir change management and versioning</title>
				<imprint>
			<date type="published" when="2011">2011. 2022-04-03</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b20">
	<monogr>
		<author>
			<persName><surname>Hl7</surname></persName>
		</author>
		<ptr target="http://hl7.org/fhir/versions.html#change" />
		<title level="m">Fhir rules for inter-version change</title>
				<imprint>
			<date type="published" when="2011">2011. 2022-04-03</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b21">
	<analytic>
		<title level="a" type="main">The fhir api</title>
		<author>
			<persName><forename type="first">T</forename><surname>Benson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Grieve</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Principles of Health Interoperability</title>
				<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="2021">2021</date>
			<biblScope unit="page" from="103" to="121" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b22">
	<monogr>
		<ptr target="http://hl7.org/fhir/versions.html#change" />
		<title level="m">HL7, Fhir backward compatibility rules</title>
				<imprint>
			<date type="published" when="2011">2011. 2022-04-03</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b23">
	<monogr>
		<author>
			<persName><surname>Hl7</surname></persName>
		</author>
		<ptr target="https://build.fhir.org/narrative.html" />
		<title level="m">Narrative -fhir</title>
				<imprint>
			<date type="published" when="2011">2011. 2022-04-03</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b24">
	<analytic>
		<title level="a" type="main">On the evolution of services</title>
		<author>
			<persName><forename type="first">V</forename><surname>Andrikopoulos</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Benbernou</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">P</forename><surname>Papazoglou</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">IEEE Transactions on Software Engineering</title>
		<imprint>
			<biblScope unit="volume">38</biblScope>
			<biblScope unit="page" from="609" to="628" />
			<date type="published" when="2011">2011</date>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
