PHP code example of scisint / pcr

1. Go to this page and download the library: Download scisint/pcr library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

scisint / pcr example snippets



Pcr::check('ORF1ab','N','IC','对照');
//返回结果
/*
array(4) {
    ["result"]=>
    string(6) "阳性"
    ["is_positive"]=>
    int(1)
    ["state"]=>
    string(8) "positive"
    ["rule_code"]=>
    string(5) "1_1_1"
    ["type_warning"]=>
    int(0)
}
*/



Pcr::RULE_NOT_FIND        = '未知结果';
Pcr::RULE_INVALID         = '无效结果';
Pcr::RULE_SINGLE_POSITIVE = '单阳';
Pcr::RULE_POSITIVE        = '阳性';
Pcr::RULE_NEGATIVE        = '阴性';
Pcr::RULE_WARNING         = '警告';
Pcr::RULE_NOCT            = 'NOCT警告';
Pcr::IS_POSITIVE          = 1;
Pcr::IS_NEGATIVE          = 0;
Pcr::IS_UNKNOWN           = -1;
Pcr::POSITIVE             = 'positive';
Pcr::NEGATIVE             = 'negative';
Pcr::UNKNOWN              = 'unknown';
Pcr::NOCT                 = 'NOCT';
Pcr::BLANK                = '';
Pcr::ORF1AB               = 'ORF1ab';
Pcr::N                    = 'N';
Pcr::IC                   = 'IC';
Pcr::TYPE_WARNING         = 1;
Pcr::TYPE_WARNING_DEFAULT = 0;



use Scisint\PCR\Pcr;

var_dump(Pcr::check('NoCt','NoCt',38.30));