• FEATURES
  • PRICING
  • MARKETPLACE
  • CASE STUDIES
  • BLOG
  • OS 2.2 Label printing

    I’m trying to setup label printing. Downloaded he NiceLabel Pro and automation and the python files.

    Links in topic “Printing labels os v.2.0 config” point to atlassian.net which seems to be obsolete and I can’t find detailed instructions on setting this up.

    What do I do with these python files?

    Documentation at https://openspecimen.atlassian.net/wiki/display/CAT/Variables+and+Label+Creation reference table os_spec_label_print_job_items which doesn’t exist in my OS 2.2 database.

    John

    Hi @John_Reber,

    The complete documentation for configuring and setting up the NiceLabel is available at https://openspecimen.atlassian.net/wiki/x/YwcR

    The table name is renamed to os_label_print_job_items, Updated the documentation to reflect the correct name.

    These python files are to parse the data field and extract the individual values like:
    specimen label, specimen type, specimen class, storage location etc.

    So when you configure the NiceLabel to print the fields on label, at that time you need to specify the respective script file. This is described in the documentation.

    Note: These python scripts are the sample files added to show the complete flow. NiceLabel supports python as well as VBscript. So you can also write your own script to parse the data.

    ~Nitesh

    When trying to set the specimen_label_print_rules_file I’m getting a CFG_SETTING_NOT_FOUND error:

    {“module”:“biospecimen”,“name”:“specimen_label_print_rules_file”,“value”:"/usr/local/OS/print_rules/print_rules.csv"}

    • Adding handle: conn: 0x7fc002800600
    • Adding handle: send: 0
    • Adding handle: recv: 0
    • Curl_addHandleToPipeline: length: 1
      • Conn 0 (0x7fc002800600) send_pipe: 1, recv_pipe: 0
    • About to connect() to openspecimen.kcc.tju.edu port 8443 (#0)
    • Trying 10.161.154.36…
    • Connected to openspecimen.kcc.tju.edu (10.161.154.36) port 8443 (#0)
    • TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
    • Server certificate: *.kcc.tju.edu
    • Server certificate: Go Daddy Secure Certificate Authority - G2
    • Server certificate: Go Daddy Root Certificate Authority - G2

    PUT /openspecimen/rest/ng/config-settings HTTP/1.0
    Host: openspecimen.kcc.tju.edu:8443
    Accept: /
    Content-Type: application/json
    Content-Length: 122
    Authorization: Basic anByZWJlcjo1Mjk2X0Nha2Vycw==

    • upload completely sent off: 122 out of 122 bytes
      < HTTP/1.1 400 Bad Request
    • Server Apache-Coyote/1.1 is not blacklisted
      < Server: Apache-Coyote/1.1
      < Access-Control-Allow-Origin: http://localhost:9000
      < Access-Control-Allow-Credentials: true
      < Access-Control-Allow-Methods: POST, GET, PUT, DELETE, PATCH, OPTIONS
      < Access-Control-Allow-Headers: Origin, Accept, Content-Type, X-OS-API-TOKEN, X-OS-API-CLIENT
      < Cache-Control: no-cache
      < Content-Type: application/json
      < Date: Tue, 22 Sep 2015 15:51:11 GMT
      < Connection: close
      <
    • Closing connection 0

    Stattus:
    Array
    (
    [0] => Array
    (
    [url] => https://openspecimen.kcc.tju.edu:8443/openspecimen/rest/ng/config-settings
    [content_type] => application/json
    [http_code] => 400
    [header_size] => 423
    [request_size] => 330
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 0.56421
    [namelookup_time] => 0.001238
    [connect_time] => 0.018762
    [pretransfer_time] => 0.299104
    [size_upload] => 122
    [size_download] => 103
    [speed_download] => 182
    [speed_upload] => 216
    [download_content_length] => -1
    [upload_content_length] => 122
    [starttransfer_time] => 0.564103
    [redirect_time] => 0
    [certinfo] => Array
    (
    )

            [primary_ip] => 10.161.154.36
            [primary_port] => 8443
            [local_ip] => 10.161.154.124
            [local_port] => 56035
            [redirect_url] => 
        )
    

    )

    End Status

    Status: (Array)

    Result: ([{“code”:“CFG_SETTING_NOT_FOUND”,“message”:“Setting specified in requested operation does not exists”}])

    Array
    (
    [0] => Array
    (
    [code] => CFG_SETTING_NOT_FOUND
    [message] => Setting specified in requested operation does not exists
    )

    )

    Hi @John_Reber,

    Actually there was a typo in the property name, the name will be specimen_label_print_rules. After this Json will look like below:

    {“module”:“biospecimen”,“name”:“specimen_label_print_rules”,“value”:"/usr/local/OS/print_rules/print_rules.csv"}

    With this it should work and update the print rule csv file.

    ~Nitesh

    Yes, that worked.

    Thanks,
    John

    I configured a print_rules.csv:

    Tissue * * 10.161.154.161 Std specimen_label,specimen_type,specimen_type,specimen_location default

    When trying to print I get a message:

    2015-09-30 11:05:40,710 [http-bio-8443-exec-8] WARN com.krishagni.catissueplus.core.biospecimen.services.impl.DefaultSpecimenLabelPrinter- No print rule matched specimen: APB0542826

    Specimen Class is Tissue, Type is Fixed Tissue Block.

    Also, am I correct in the assumption that data should be loaded into the database at this point and the Nice Label software takes over and reads from the database?

    Hi @John_Reber,

    It works the same way. Haven’t seen any problem with the configuration. However I will try this once again locally and get back to you.

    Yes correct. If you have configured the nice label as per the documentation on wiki, then it will work same way. Nice label polls the database table, whenever you print from UI, OpenSpecimen make an entry into the databse and nice label reads that and send to printer.

    ~Nitesh

    In addition, when I get the above error in OS-catalina.log, I also get the following 400 error in localhost_access_log.2015-10-01.txt:

    10.161.154.226 - - [01/Oct/2015:13:33:18 -0400] “POST /openspecimen/rest/ng/specimen-label-printer/ HTTP/1.1” 400 106

    This issue is resolved over call. There were two issues:

    1. Wrong IP address specified in the rule csv file. It should be a source IP, from where the print request is generated.
    2. The print rule file accepts fields in tab separated format.

    Rectifying them resolved the issue.

    ~Nitesh