# $Id: siebel.nzd,v 1.23 2007/10/12 19:56:34 mike Exp $ # # See Net::Z3950::DBIServer::Spec for a formal description of this # file's format, if you need it. But it's actually pretty obvious. datasource = "dbi:Oracle:sblt" # Or try: dbi:Oracle:host=rsoratest.loctest.gov;sid=sblt # which should work without needing TNS_ADMIN=/ora928/network/admin username = "SIESEARCH" password = "YcoyC60r603L1wdk1F50" database "authors" { table = "siebel.s_ins_claim_xm" search attrset bib1 { access 12 = "row_id" # Local number access 1 = "attrib_01" # Personal name access 1003 = "attrib_01" # Author } data format xml { record = "author" field "id" = "row_id" field "name" = "attrib_01" field "is_author" = "attrib_05" field "is_claimant" = "attrib_11" } } database "titles" { table = "siebel.s_ins_claim" auxiliary "siebel.s_ins_claim_xm" with "siebel.s_ins_claim_xm.par_row_id = siebel.s_ins_claim.row_id" search { attrset bib1 { access 12 = "row_id" # Local number access 4 = "x_title_proper" # Title access 1031 = "sub_cd" # Material-type (stretch!) } } data { format xml { record = "title" attrs = "xmlns:dc='http://purl.org/dc/elements/1.1/' " + "xmlns:siebel='http://loc.gov/siebel/elements/1.0/'" schema = "http://dublincore.org/schemas/xmls/simpledc20021212.xsd" field "dc:identifier" = "row_id" field "dc:title" = "x_title_proper" field "siebel:titletype" = "sub_cd" field "dc:creator" = "siebel.s_ins_claim_xm.attrib_01" } } } database "request" { table = "siebel.s_srv_req" auxiliary "siebel.s_ins_claim" + ", siebel.s_ins_claim_xm" + ", siebel.s_srv_req_xm" with "siebel.s_ins_claim.srv_req_id = siebel.s_srv_req.row_id" # + " and siebel.s_ins_claim.sub_cd = 'APTI'" + " and siebel.s_ins_claim_xm.par_row_id = siebel.s_ins_claim.row_id" + " and siebel.s_srv_req_xm.par_row_id = siebel.s_srv_req.row_id" + " and siebel.s_srv_req_xm.type = 'REGNMBR'" + " and siebel.s_srv_req_xm.attrib_04 = 'Primary'" search { defaultattrs 1=1016, 5=3 attrset bib1 { access 12 = "row_id" # Local number access 1032 = "sr_num" # Doc-id access 4 = "sr_title" # Title access 1 = "siebel.s_ins_claim_xm.attrib_01" # Personal name access 1003 = "siebel.s_ins_claim_xm.attrib_01" # Author access 1016 = "sr_title,siebel.s_ins_claim_xm.attrib_01" # Any # access 1016 = "sr_title" # Any access 1182 = "siebel.s_srv_req_xm.attrib_03" # GILS "Original Control Identifier", which is stretching } } data { format xml { record = "request" attrs = "xmlns:dc='http://purl.org/dc/elements/1.1/' " + "xmlns:siebel='http://loc.gov/siebel/elements/1.0/'" schema = "http://dublincore.org/schemas/xmls/simpledc20021212.xsd" field "dc:identifier" = "sr_num" field "dc:creator" = "siebel.s_ins_claim_xm.attrib_01" field "dc:title" = "siebel.s_ins_claim.x_title_proper" field "siebel:primary_title" = "sr_title" field "siebel:row_id" = "row_id" field "siebel:regnum" = "siebel.s_srv_req_xm.attrib_03" # Next field not needed: it's always APTI now that we're linking on it #field "siebel:sub_cd" = "siebel.s_ins_claim.sub_cd" } } } # Problems # * No word-searching: the best we can do is truncate-left-and-right. # * All searching is case-sensitive. # * There is no single APTI: some records have multiple. # * Authors are linked via PRI title row, but we need to select the # APTI title row (or rows). # * No distinction between author and claimant # * No remitter # * The repeating-field problem whereby multiple authors yield # multiple records each containing a single author rather than a # single record containing multiple authors. # # How to fake case-insensitive searching: # select x_title_proper from siebel.s_ins_claim where x_title_proper_uc like upper('%fish%') and sub_cd = 'PRI'; # select attrib_01 from siebel.s_ins_claim_xm where x_author_uppercase like upper('%smith%');