<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Health::SHC - Verify Smart Health Card Signature and Extract data.

SYNOPSIS
        use Health::SHC::Validate;
        my $shc_valid = Health::SHC::Validate-&gt;new();

        # Use builtin trusted keys
        my $data = $shc_valid-&gt;get_valid_data($qr);

        # Use your own keys to validate - you may trust them
        my $data = $shc_valid-&gt;get_valid_data($qr, $keys_json);

        use Health::SHC;
        my $sh = Health::SHC-&gt;new();
        my @patients = $sh-&gt;get_patients($data);

        foreach (@patients) {
            print "Patient: ", $_-&gt;{given}, " ", $_-&gt;{middle}, " ", $_-&gt;{family}, "\n";
        }

        my @immunizations = $sh-&gt;get_immunizations($data);

        print "Vacination Provider", "\t", "Date", "\n";
        foreach (@immunizations) {
            print $_-&gt;{provider}, "\t", $_-&gt;{date}, "\n";
        }

        my @vaccines = $sh-&gt;get_vaccines($data);

        print "Manufacturer\tLot Number\tCode\tCode System\n";
        foreach (@vaccines) {
            print $_-&gt;{manufacturer}, "\t\t", $_-&gt;{lotNumber}, "\t\t";
            my $codes = $_-&gt;{codes};
            foreach my $tmp (@$codes) {
                print   $tmp-&gt;{code}, "\t",
                        $tmp-&gt;{system}, "\t";
            }
            print "\n";
        }

DESCRIPTION
    This perl module can extract a Smart Health Card's data from PDFs or
    image file. The extracted shc:/ Smart Health Card URI is decoded and the
    signature checked. The module provide several methods to retrieve the
    data in a more usable format.

    Health::SHC supports QR codes for the following regions:

        * Quﾃδｩbec
        * British Columbia
        * Saskatchewan
        * Alberta
        * Newfoundland and Labrador
        * Nova Scotia
        * Ontario
        * Northwest Territories
        * Yukon
        * New Brunswick/Nouveau-Brunswick
        * Japan

    The keys in share/keys.json (and supported regions) are based on the
    keys included with https://github.com/obrassard/shc-extractor.

    Additional regions can be added with a pull request or by logging an
    issue at https://github.com/timlegge/perl-Health-SHC/issues.

COPYRIGHT
    The following copyright notice applies to all the files provided in this
    distribution, including binary files, unless explicitly noted otherwise.

    Copyright 2021 - 2024 Timothy Legge &lt;timlegge@gmail.com&gt;

LICENCE
    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

  METHODS
   new(...)
    Constructor; see OPTIONS above.

   get_patients($data)
    Arguments: $data: string Smart Health Card data without the "shc:/"
    prefix

    Returns: hash containing the Patient information

   get_immunizations($data)
    Arguments: $data: string Smart Health Card data without the "shc:/"
    prefix

    Returns: hash containing the Immunization data

   get_vaccines($data)
    Arguments: $data: string Smart Health Card data without the "shc:/"
    prefix

    Returns: hash containing the Vaccine data

</pre></body></html>