Versions Compared

Key

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

openspecimen/rest/ng/specimen/print-rules

...

Parameter

Definition

nameName of the Print Rule. Should be unique in system

specimenClass[Optional]

Class of the specimen. By default it will be 'Anyany'
Permissible Values: Molecularmolecular, Fluidfluid, Cellcell, Tissuetissue, Anyany

specimenType[Optional]

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

labelType

This could be Capcap+Slide slide or Sideside. 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 'Anyany'.

It can be specified in wild card format like grouping

e.g

all IPs starting with 128 will have same rule

all IPs starting with 128.3. will have same rule

loginNamelogin Login name of User.
domainNamedomain Domain name of User.
cpShortTitleCollection protocol short title

...

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

{
"name":"My PrintRule",
"specimenClass" : "Fluidfluid",
"specimenType" : "Anyany",
"labelType" : "Cap+Slide",
"dataOnLabel" : ["Specimen Labelspecimen label","Specimen specimen type"],
"printerName" : "TB2",
"workstationIP" : "127.0.0.1",
"loginName" : {"loginName" : "admin@admin.com", "domainName" :"catissue"},
"cpShortTitle" : "SCS_CP"
}

Response

{
id3
name"My PrintRule"
specimenClass"Fluidfluid"
specimenType"Anyany"
labelType"Cap+Slide"
workstationIP"127.0.0.1"
dataOnLabel
[
2]
0:  "Specimen type"
1:  "Specimen Label"
-
printerName"TB2"
cpShortTitle"SCS_CP"
loginName
{
loginName"admin@admin.com"
domainName"catissue"
}
-
}

 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