Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

catissuecore/rest/ng/print-rules

Use this resource to create new print rule in the caTissue application. Use HTTP POST method to call this API by passing the below details in JSON format.

 

Below are the attributes which need to be sent in the request body:

Parameter

Definition

nameName of the Print Rule. Should be unique in system

specimenClass

Class of the specimen.
Permissible Values: Molecular, Fluid, Cell, Tissue

specimenType[Optional]

Type of the specimen . By default it will be 'Any'
Permissible Values: 'Any' or any specimen type of the class specified in same row

labelType

This could be Cap+ Slide or Side. This parameter and the specimen type define the information that needs to go in the label. This will help user to configure based on label physical dimensions.

dataOnLabel

Information that needs to be included in the label based on the specimen class/type and label type

printerName

Name of the printer where the request has to be forwarded to.

workstationIP[Optional]

IP address of the machine from where the print request will come and this decides to which printer the request has to be forwarded to. By default it will be 127.0.0.1


http[s]:<host>:<port>/catissuecore/rest/ng/print-rules

Use this URL to add  in caTissue application.

Result:

The response of this request will contains the details of the created role.

Below is the example of the create role:

URLhttp://<host>:<port>/catissuecore/rest/ng/print-rules
MethodPOST
Requestapplication/json
json

{

    "name":"My PrintRule",

    "specimenClass" : "Fluid",

    "SpecimenType" : "Any",

    "labelType" : "Cap+ Slide",

    "dataOnLabel" : "Specimen Label, Specimen type,CP title,Created On",

    "printerName" : "TB2",

    "workstationIP" : "127.0.0.1"    

}

Response

{

    "id" : 1,

    "name":"My PrintRule",

    "specimenClass" : "Fluid",

    "SpecimenType" : "Any",

    "labelType" : "Cap+ Slide",

    "dataOnLabel" : "Specimen Label, Specimen type,CP title,Created On",

    "printerName" : "TB2",

    "workstationIP" : "127.0.0.1"    

}

 Error Cases :

code
Applies to
Status Message
200All resourcesPrint Rule has been created successfully
400All requestsInvalid parameters, e.g  duplicate Print Rule Name, blank Print Rule Name etc
401All requestsAuthorization failed, User doesn’t have Authority
500All requestsInternal server error, Encountered server error while performing operations