NAME
Business::ID::POM - Parse food/drug registration code published by the Indonesian National Agency of Drug and Food Control (POM)
VERSION
This document describes version 0.005 of Business::ID::POM (from Perl distribution Business-ID-POM), released on 2023-10-03.
DESCRIPTION
This module can be used to validate food/drug registration codes published by the Indonesian National Agency of Drug and Food Control (BPOM, Badan Pengawas Obat dan Makanan). These codes include:
MD, ML - food
SI, SD, SL - health supplements
NA, NB, NC, ND, NE - cosmetics
TR, TI, HT, FF - traditional, herbal medicine, & phytopharmaceutical products
D, G - pharmaceutical products
Not yet included BPOM codes:
CA, CD, CL - cosmetics?
Related codes:
SNI
P-IRT
FUNCTIONS
parse_pom_reg_code
Usage:
parse_pom_reg_code(%args) -> [$status_code, $reason, $payload, \%result_meta]
Parse food/drug registration code published by the Indonesian National Agency of Drug and Food Control (POM).
Examples:
Example #1:
parse_pom_reg_code(code => "MD240935001200027");
Result:
[ 200, "OK", { category_code => "MD", category_id => "Makanan (M), dalam negeri (D)", food_company_code => "00027", food_company_product_code => "0012", food_is_rba => 1, food_packaging_type_code => 4, food_province_code => "09", food_risk_code => 2, food_risk_id => "T - Tinggi", food_type_code => 35, number => 240935001200027, }, {}, ]
Example #2:
parse_pom_reg_code(code => "MD 224510107115");
Result:
[ 200, "OK", { category_code => "MD", category_id => "Makanan (M), dalam negeri (D)", food_company_code => 107, food_company_product_code => 115, food_is_rba => 0, food_packaging_type_code => 2, food_province_code => 10, food_type_code => 245, number => 224510107115, }, {}, ]
Example #3:
parse_pom_reg_code(code => "DBL9624502804A1");
Result:
[ 200, "OK", { category_code => "DBL", category_id => "Obat merek dagang (D), bebas (B), lokal (L)", drug_category_code => "B", drug_company_code => 245, drug_company_product_code => "028", drug_dosage_form_code => "04", drug_dosage_form_id => "kaplet (04)", drug_origin_code => "L", drug_packaging_serial => 1, drug_strength_serial => "A", drug_year => 1996, number => "9624502804A1", }, {}, ]
Example #4:
parse_pom_reg_code(code => "NC14191300159");
Result:
[ 200, "OK", { category_code => "NC", category_id => "Kosmetik (N), Eropa (C)", cosmetic_category_code => "C", cosmetic_country_code => 14, cosmetic_group_code => 13, cosmetic_notification_code => "00159", cosmetic_year => 2019, number => 14191300159, }, {}, ]
Example #5:
parse_pom_reg_code(code => "POM TR092699241");
Result:
[ 200, "OK", { category_code => "TR", category_id => "Obat traditional (T), dalam negeri (R)", number => "092699241", trad_company_product_serial => 9924, trad_company_type_code => 2, trad_company_type_id => "pabrik jamu", trad_origin => "R", trad_packaging_code => 6, trad_packaging_id => "cairan", trad_packaging_volume => "15ml", trad_packaging_volume_code => 1, trad_year => 2009, }, {}, ]
Example #6:
parse_pom_reg_code(code => "FF182600791");
Result:
[ 200, "OK", { category_code => "FF", category_id => "Fitofarma (FF)", number => 182600791, }, {}, ]
Example #7:
parse_pom_reg_code(code => "SD181353251");
Result:
[ 200, "OK", { category_code => "SD", category_id => "Suplemen kesehatan (S), dalam negeri (D)", number => 181353251, }, {}, ]
Example #8:
parse_pom_reg_code(code => "SI184509731");
Result:
[ 200, "OK", { category_code => "SI", category_id => "Suplemen kesehatan (S), impor (I)", number => 184509731, }, {}, ]
Example #9:
parse_pom_reg_code(code => "SL091300431");
Result:
[ 200, "OK", { category_code => "SL", category_id => "Suplemen kesehatan (S), lisensi (L)", number => "091300431", }, {}, ]
This routine does not check whether the specified code is actually registered. Use https://cekbpom.pom.go.id/ for that.
This function is not exported by default, but exportable.
Arguments ('*' denotes required arguments):
code* => str
Input POM code to be parsed.
Returns an enveloped result (an array).
First element ($status_code) is an integer containing HTTP-like status code (200 means OK, 4xx caller error, 5xx function error). Second element ($reason) is a string containing error message, or something like "OK" if status is 200. Third element ($payload) is the actual result, but usually not present when enveloped result is an error response ($status_code is not 2xx). Fourth element (%result_meta) is called result metadata and is optional, a hash that contains extra information, much like how HTTP response headers provide additional metadata.
Return value: (any)
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Business-ID-POM.
SOURCE
Source repository is at https://github.com/perlancar/perl-Business-ID-POM.
SEE ALSO
AUTHOR
perlancar <perlancar@cpan.org>
CONTRIBUTING
To contribute, you can send patches by email/via RT, or send pull requests on GitHub.
Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond that are considered a bug and can be reported to me.
COPYRIGHT AND LICENSE
This software is copyright (c) 2023, 2021, 2019 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Business-ID-POM
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.