1// Copyright (C) 2024 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// This file contains the proto libraries, python script and genrule required for FHIR structural
16// validation of PHR medical data.
17// The python script generate_fhir_spec.py reads in the FHIR spec json files published by FHIR
18// (located in the android external folder). The official spec is then used to generate a fhirspec
19// proto message that is written to "fhirspec-r4.binarypb". This file is then added to
20// java_resources of the HC service to be used for the validation of incoming FHIR resources,
21// specifically in the FhirSpecProvider class.
22
23package {
24    default_applicable_licenses: ["Android-Apache-2.0"],
25    default_team: "trendy_team_android_health",
26}
27
28java_library {
29    name: "backup-data-proto",
30    sdk_version: "core_current",
31    proto: {
32        type: "lite",
33        include_dirs: [
34            "external/protobuf/src",
35            "external/protobuf/java",
36        ],
37    },
38    srcs: [
39        "backup_data.proto",
40    ],
41    static_libs: ["libprotobuf-java-lite"],
42    apex_available: ["com.android.healthfitness"],
43}
44