# Query Processing in Blockchain Systems: Current State and Future Challenges
## 3 Application Domains Identified through Literature Review
### Health Data Management  
In the health sector, digitization of many processes can significantly facilitate the lives of patients and physicians [37]. To this end, data in the form of patient records, e.g., electronic health records [38], must be shared and extended reliably and trustworthy among physicians. For example, a primary care physician prepares a medical record, and then refers the patient to a specialist, who adds their diagnosis. In addition, due to the _Quantified Self Movement_[39], people started to monitor themselves using IoT technologies, e.g., blood glucose measurements via continuous glucose monitoring [40] or heart rates via a smartwatch [41]. All these measured data are gathered in a central hub (e.g., a smartphone) and linked to compose a personal health profile [42]. By adding these personal health profiles to the patient records, physicians have access to even more health-related data which helps them to make a more accurate diagnosis.  
The use of blockchain technology is suitable in such a use case because it allows decentralized data sharing. With a blockchain, a hospital can provide a data infrastructure through which physicians can share patient data with each other in a simple manner [43]. Moreover, the inherent immutability and tamper-resistance characteristics of a blockchainensure data security, which is mandatory for medical data. This is particularly important due to the increasing threat of cyberattacks in healthcare [44]. By enabling patients to participate in the blockchain, they are empowered to provide additional health-related data on their own [45].  
Especially when sensitive data such as health data are stored in a blockchain, it is obvious that data privacy protection measures have to be applied. This, however, contradicts the fundamental principles of a blockchain, according to which every participant has full access to all data. To this end, [PERSON] et al. [46] present an approach in which data are stored tamper-resistant in a blockchain, but in which queries are processed in a privacy-preserving manner, and in which the result sets do not allow further inference about the data subjects.  
There are multiple examples in literature in which blockchains are used to manage and share health data, e.g., [PERSON] et al. [47], [PERSON] et al. [48], [PERSON] [49], [PERSON] et al. [50], and [PERSON] et al. [51].  
Based on this research, we can conclude that there are two types of data in health data management:  
* The data entered by physicians are usually documents, e.g., diagnosis and treatment plans, that are modified over time.
* The data entered by patients are usually measurements carried out by medical IoT devices that are only valid at a specific point in time.  
In the context of health data management, queries regarding the current health status of an individual patient, information on disease progression over a given period of time, as well as aggregate measurement data are particularly relevant. Typical queries therefore include, but are not limited to:  
* Retrieve all diagnoses of a specific patient from a given date.
* Retrieve the latest diagnosis of a specific patient where changes to the document are highlighted.
* Aggregate the measurements of a specific patient over a given period.