SMATDB Search and subfields

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf SMATDB Search and subfields

  • Creator
    Topic
  • #54911
    Femina Jaffer
    Participant

      Can anyone assist on how I would be able to search for a subfield like T^MC?  I have a UDM message type, and I need to look for this T^MC in the URD segment?  Any ideas?  Just basically searching any subfields..?

      Thank you,

      Femina

    Viewing 6 reply threads
    • Author
      Replies
      • #83428
        Keith McLeod
        Participant

          What version of Cloverleaf are you running?

          Are you looking for specific contents of a field or subfield?  Like what is contained in URD:3.1 or are you looking for the pattern T^MC? anywhere?

        • #83429
          Femina Jaffer
          Participant

            Thanks for responding Keith.  It won’t hurt to figure out both ways.

          • #83430
            Keith McLeod
            Participant

              If you are just looking for a pattern of T^MC you can use

              T^MC

              or if they are the only contents in a random field

              |T^MC|

              Here are some more complex regular expressions

              #### looks for any of the values CCVI, CSIC, C4S or CMI in field PV1:3

              rPV1(?:[^|]*|){3}(CCVI|CSIC|C4S|CMI)

              #### looks for any of the values CCVI, CSIC, C4S or CMI in field PV1:3.1(second Component since o based indexing

              rPV1(?:[^|]*|){3}(?:([^^]*)^){1}(CCVI|CSIC|C4S|CMI)

              #### looks for any of the values in PID:11.3(4th component)

              rPID(?:[^|]*|){11}(?:[^^]*^){3}([^^]+) This works well….for components.

              If you are on 6.1.1.0 then it contains a feature for  searching specific fields for a value.

              I noticed that if you typed in PID. it would list possible field expressions and create a statement like PID.3.1=’;

              I don’t have 6.1.1.0 available to me at the moment. Also the r helps in more clearly defining the Segment Identifier in the above regular expressions… The segment and the numbers can easily be adjusted to suit your needs…

              Hope this helps….

            • #83431
              Charlie Bursell
              Participant

                The smatDB script I wrote allows for regexp searches.  Give it a try

              • #83432
                Femina Jaffer
                Participant

                  Thank you gentlemen, that helps  a lot.  Keith that worked!

                  Charlie, I will definitely look at your script and give that a try.  Thanks for your help again.

                  FJ

                • #83433
                  Femina Jaffer
                  Participant

                    Charlie, is that the hcismatdb.htc script?

                  • #83434
                    Charlie Bursell
                    Participant

                      Yep

                  Viewing 6 reply threads
                  • The forum ‘Cloverleaf’ is closed to new topics and replies.