Skip to content

HL7 Message ORC Segment GetQuantityTiming Part Cant Able to Add RepeatPattern Subelements Using NHapi.Model.V25 #619

Description

@Raseem001

Sir
I need to Add Repeat Pattern Following Data For Malaffi Submission but the Code Showing Error of Following

Csharp Code

using NHapi.Model.V25.Datatype;
using NHapi.Model.V25.Message;
using NHapi.Model.V25.Segment;
using NHapi.Base.Model;  

var timing = orc.GetQuantityTiming(0);
timing.Quantity.Identifier.Value = "BID";
timing.Quantity.Text.Value = "twice a day at institution-specified times";
timing.Quantity.NameOfCodingSystem.Value = "MALAFFI";
CQ: does not Contain a Definition for 'Identifier' and no accessible extension method 'Identifier' accepting a first argument of type 'CQ' could be found(are you mssing a using directive or an assempbly reference ?)

RDS-O13 ORC Segment Sample Message :

ORC|NW|678998^^SYSTEMCODE|678998^^SYSTEMCODE||active||^QID^four times a day at institution-specified times^MALAFFI^4 Days^20191117120000^20191119180000^R^PRN SNOMED||20191113102719|GD18123^Test1^test4^^^^^^&SYSTEMCODE-DOHID|GD18123^Test1^test4^^^^^^&SYSTEMCODE-DOHID|GD18123^Test1^test4^^^^^^&SYSTEMCODE-DOHID

Activity

  1. milkshakeuk commented on Dec 11, 2024

    @milkshakeuk
    Member

    The error you are seeing is accurate, according to the 2.5 specification the quantity (data type TQ Quantity/Timing) does not contain a field called Identifier see here for available fields.

    However, looking at your example encoded ORC segment perhaps you are looking for something like this:

    var timing = orc.GetQuantityTiming(0);
    timing.Interval.RepeatPattern.Value = "BID";
    timing.Duration.Value = "twice a day at institution-specified times";
    timing.StartDateTime.Time.Value = "20191117120000";
    timing.EndDateTime.Time.Value = "20191119180000";
    timing.Priority.Value = "R";
    timing.OccurrenceDuration.NameOfCodingSystem.Value = "MALAFFI";
    timing.OccurrenceDuration.Text.Value = "4 Days";

    The output of encoded TQ Quantity/Timing (ORC-7) would look like this:
    ^BID^twice a day at institution-specified times^20191117120000^20191119180000^R^^^^^&4 Days&MALAFFI
    however I am not 100% sure based on your sample (ORC-7) which seems like it's not quite aligned with the HL7 standard.
    ^QID^four times a day at institution-specified times^MALAFFI^4 Days^20191117120000^20191119180000^R^PRN SNOMED

  2. milkshakeuk commented on Dec 11, 2024

    @milkshakeuk
    Member

    Unless you meant to assign the Quantity Units (ORC.7.1.2) which does seem to have those fields?

    using NHapi.Model.V25.Datatype;
    using NHapi.Model.V25.Message;
    using NHapi.Model.V25.Segment;
    using NHapi.Base.Model;  
    
    var timing = orc.GetQuantityTiming(0);
    timing.Quantity.Units.Identifier.Value = "BID";
    timing.Quantity.Units.Text.Value = "twice a day at institution-specified times";
    timing.Quantity.Units.NameOfCodingSystem.Value = "MALAFFI";
    timing.StartDateTime.Time.Value = "20191117120000";
    timing.EndDateTime.Time.Value = "20191119180000";
    timing.Priority.Value = "R";

    but that produces this encoded TQ:
    &BID^^^20191117120000^20191119180000^R

  3. Raseem001 commented on Dec 11, 2024

    @Raseem001
    Author

    ^QID^four times a day at institution-specified times^MALAFFI^4 Days^20191117120000^20191119180000^R^PRN SNOMED

    in this Format Malaffi need to Get. Format is given in their document is like this. After Repeat Pattern Description We need to Put MALAFFI in it.

  4. milkshakeuk commented on Dec 11, 2024

    @milkshakeuk
    Member

    If you need it exactly as per the sample, you would need to assign values that do not match the fields intended use case:

    var timing = orc.GetQuantityTiming(0);
    timing.Interval.RepeatPattern.Value = "QID";
    timing.Duration.Value = "four times a day at institution-specified times"; // is this a duration?
    timing.StartDateTime.Time.Value = "MALAFFI"; // doesn't look like a Start Date Time?
    timing.EndDateTime.Time.Value = "4 Days";    // again doesn't look like a DateTime
    timing.Priority.Value = "20191117120000";    // assigning a date to priority?
    timing.Condition.Value = "20191119180000";   // assigning a date to a condition?
    timing.Text.Value = "R";                     // pretty sure this is not intended
    timing.Conjunction.Value = "PRN SNOMED";     // same here

    The output of encoded TQ Quantity/Timing (ORC-7) would look like this:
    ^QID^four times a day at institution-specified times^MALAFFI^4 Days^20191117120000^20191119180000^R^PRN SNOMED

  5. Raseem001 commented on Dec 12, 2024

    @Raseem001
    Author
  6. locked and limited conversation to collaborators on Dec 12, 2024
  7. converted this issue into a discussion #620 on Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions