Announcement

Collapse
No announcement yet.

Combining OBX lines into one AND inserting 80 character limit ~ tilde

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    It's the for each. Replacing with for...

    Code:
    for (var i = 0; i < msg.OBX.length(); i++)
    {
    	var obx = msg.OBX[i];
    	for(var j = 0; j < obx['OBX.5'].length(); j++)
    	{
    		var obx5 = obx['OBX.5'][j]['OBX.5.1'];
    		while(obx5.toString().length > 80)
    		{
    			var tmpOBX = obx5.toString().substring(0,80);
    			var obxIndex = tmpOBX.lastIndexOf(' ');
    			obxArray.push(tmpOBX.substring(0,obxIndex));
    			obx5 = obx5.toString().substring(obxIndex,obx5.toString().length);
    		}
    		obxArray.push(obx5.toString());
    	}
    }

    Comment


    • #17
      Looks Fantastic! Thank you for staying with me on this. I only have one item to confirm. It looks like it avoids adding a ~ if there is already one present within 80 characters. Is this the case? That was my only concern as I didn't want to add any extra lines to the report. It certainly looks like it avoids that though as it doesn't just add every 80 characters, it adds ONLY if there hasn't been a ~ for 80 characters.


      OBX|1|FT|||Referring Physician: Ref doc, MD~~Patient Name: pt name~~report~~EXAM: FLUOROSCOPIC GUIDED TUNNELED DIALYSIS CATHETER EXCHANGE AND CENTRAL~ VENOUS ANGIOPLASTY .~~IMAGES: 12~~EXAM DATE AND TIME: 2013-10-09 10:18:18.0~~REASON FOR EXAM: Poorly functioning left subclavian tunneled dialysis catheter.~~COMPARISON: None.~~OPERATOR: operator, MD~~REFERRING PHYSICIAN: Dr. me.~~PREPROCEDURE DIAGNOSIS: Poorly functioning tunneled hemodialysis catheter.~~POST PROCEDURE DIAGNOSIS: Same. Central venous stenosis.~~ANESTHESIA: ~Moderate sedation with Anesthesiology.~Local anesthesia with 10 mL of 1% lidocaine.~~PROCEDURES:~1. Fluoroscopic-guided exchange of tunneled central venous catheter.~2. Venous angioplasty of central venous stenosis.~~PROCEDURE IN DETAIL:~After an explanation of the procedure including risks and benefits, written~ informed consent was obtained.~~The patient was premedicated with 25 mg of Benadryl IV because of history of~ hives with IV contrast.~~The patient was placed supine on the angiographic table and the indwelling left~ subclavian tunneled dialysis catheter and the area around it were cleaned and~ draped in usual sterile fashion. Propofol anesthesia was given by the Nurse~ Anesthetist via the indwelling catheter because of the lack of peripheral IV~ access. Generous local anesthesia was instilled at the exit site of the~ catheter and around the cuff using 1% lidocaine local anesthesia. The cuff was~ freed using blunt dissection techniques. Contrast injection via both ports of~ the catheter showed no fibrin sheath. A 0.035 inch Bentson guidewire and a~ 0.035 inch angled Glidewire was then advanced via both ports and the tips~ manipulated into the IVC under fluoroscopic guidance. The catheter was then~ pulled back until the tip was in the left subclavian vein. A central venogram~ was then performed which showed high-grade stenosis of the brachiocephalic~ vein and SVC to the size of the catheter. A 12 mm high-pressure Conquest~ balloon was then used to perform angioplasty of the stenosed segment of vein~ with improvement and collateral circulation noted on followup venogram.~~A new 23 cm tip to cuff Equistream tunneled dialysis catheter was then advanced~ via the guidewire until the tip was in the right atrium under fluoroscopic~ guidance.~~Flow parameters with a 10 cc syringe were excellent. Hemostasis was ensured.~ The catheter was then secured to the skin using 2/0 Prolene sutures and a dry~ dressing was then placed over the catheter.~~The patient tolerated the procedure well without immediate complications and~ was transferred from the angiography suite in stable condition.~~EBL: Minimal. 2 mL.~~CONTRAST: 18 mL of Visipaque 320 intravenous contrast.~~RADIATION TIME/DOSE: 3.3 min; 84 mGy~~IMPRESSION~Fluoroscopic guided Left subclavian vein tunneled dialysis catheter exchange as~ above.~~Angioplasty of central venous stenosis as above.~~The catheter may be used now for dialysis. ~~CPT CODES: 36581, 77001, 35475 and 75978.~~~~THIS DOCUMENT HAS BEEN ELECTRONICALLY SIGNED~~Dr. me, MD.~~10/09/2013 16:32~~|||||||||201310091635||123456^NAME^TEST

      Comment


      • #18
        If you want it to only split every 80 characters since a ~ appeared, I suggest turning on "Parse Field Repetitions" for the message (so if you're doing this transformation on the destination, set that on the Source Outbound properties). A quick test seemed to show that working.

        Comment

        Working...
        X