All files / src/app/docs/klarbefund page.tsx

100% Statements 6/6
100% Branches 0/0
100% Functions 2/2
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 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 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 144 145 146 147 148 149 150 151                  1x             1x       1x                 2x 2x                                                                                                                   10x                                                                                                                            
import Link from "next/link";
import { ArrowLeft, Smartphone } from "lucide-react";
import { DocsLastUpdated } from "@/components/docs/DocsLastUpdated";
import { ExternalA } from "@/components/docs/ExternalA";
import { PublishedDocCards } from "@/components/docs/PublishedDocCards";
import { docCards, docsInSection, REPO_URL } from "@/lib/docs/published-docs";
import { INSURER_REPORT_PAGE } from "@/lib/docs/security-docs";
import { T } from "@/lib/i18n/translate";
 
export const metadata = {
  title: "Klarbefund",
  description:
    "The iPhone app that turns a paper lab report into checkable values: the user guide and the developer guide, with screenshots, and the reports about its accuracy, security and regulatory status.",
};
 
/** Klarbefund's public TestFlight beta (ADR-050). */
const TESTFLIGHT_URL = "https://testflight.apple.com/join/ssADSXX6";
 
/** The reports about the app that live in the security section; the label
 *  is a key of docsCommon. */
const REPORTS = [
  ["klarbefund-self-assessment", "Self-assessment"],
  ["klarbefund-evidence", "Evidence"],
  ["report-for-health-insurers", "Report for health insurers"],
  ["threat-model-klarbefund", "Threat model"],
  ["klarbefund-run-on-mac", "Run the evidence on a Mac"],
] as const;
 
export default function KlarbefundDocsPage() {
  const guides = docsInSection("klarbefund");
  return (
    <div className="max-w-5xl mx-auto px-6 py-12">
      <Link
        href="/docs"
        className="inline-flex items-center gap-1 text-sm text-(--text-secondary) hover:text-(--text-primary) mb-6"
      >
        <ArrowLeft size={14} /> <T area="docsCommon">{"Back to Docs"}</T>
      </Link>
 
      <div className="mb-8">
        <h1 className="text-3xl font-bold mb-2 inline-flex items-center gap-2">
          <Smartphone size={28} aria-hidden="true" />{" "}
          <T area="nav">{"Klarbefund"}</T>
        </h1>
        <DocsLastUpdated page="/docs/klarbefund" />
        <p className="text-(--text-secondary) text-lg">
          <T
            area="docsCommon"
            tags={{
              loinc: (
                <ExternalA href="https://www.nlm.nih.gov/research/umls/sourcereleasedocs/current/LNC/index.html" />
              ),
              fhir: <ExternalA href="https://hl7.org/fhir/R4/" />,
              omop: (
                <ExternalA href="https://ohdsi.github.io/CommonDataModel/cdm54.html" />
              ),
            }}
          >
            {
              "Klarbefund is the iPhone app of this project. It scans a paper lab report, reads the values on the device, codes them with <loinc>LOINC</loinc>, keeps them encrypted on the phone and exports them as <fhir>FHIR</fhir> and <omop>OMOP</omop>, or sends them to the person's own record on the hub when they say so. Every screenshot shows invented data from the app's own demo dataset."
            }
          </T>
        </p>
      </div>
 
      <PublishedDocCards docs={docCards(guides)} testId="klarbefund-guides" />
 
      <section className="mb-10">
        <h2 className="text-xl font-semibold mb-3">
          <T area="docsCommon">{"Reports about the app"}</T>
        </h2>
        <p className="text-sm text-(--text-secondary) mb-3">
          <T
            area="docsCommon"
            tags={{
              tr: <ExternalA href="https://www.bsi.bund.de/dok/TR-03161" />,
              mdr: (
                <ExternalA href="https://eur-lex.europa.eu/eli/reg/2017/745/oj/eng" />
              ),
            }}
          >
            {
              "Accuracy, data protection, the <tr>BSI TR-03161</tr> objectives and the <mdr>medical-device question</mdr> are assessed in the security section:"
            }
          </T>
        </p>
        <ul className="text-sm space-y-1.5">
          {REPORTS.map(([slug, label]) => (
            <li key={slug}>
              <Link
                href={`/docs/security/${slug}`}
                className="text-(--accent) underline"
              >
                <T area="docsCommon">{label}</T>
              </Link>
            </li>
          ))}
          <li>
            <T
              area="docsCommon"
              tags={{ a: <ExternalA href={INSURER_REPORT_PAGE} /> }}
            >
              {
                "<a>Report for health insurers, on one page</a> for a steering meeting."
              }
            </T>
          </li>
        </ul>
      </section>
 
      <section className="mb-4">
        <h2 className="text-xl font-semibold mb-3">
          <T area="docsCommon">{"Get the app"}</T>
        </h2>
        <ul className="text-sm space-y-2 text-(--text-secondary)">
          <li>
            <T
              area="docsCommon"
              tags={{ a: <ExternalA href={TESTFLIGHT_URL} /> }}
            >
              {
                "<a>Join the beta on TestFlight</a> on an iPhone with iOS 26 or later."
              }
            </T>
          </li>
          <li>
            <T
              area="docsCommon"
              tags={{
                a: <ExternalA href={`${REPO_URL}/tree/main/clients/ios`} />,
                issue: (
                  <a
                    href={`${REPO_URL}/issues/186`}
                    target="_blank"
                    rel="noopener noreferrer"
                    className="text-(--accent) underline"
                  />
                ),
              }}
            >
              {
                "<a>Source code</a> and the work tracked in <issue>issue #186</issue>."
              }
            </T>
          </li>
        </ul>
      </section>
    </div>
  );
}