Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HIPPA compliant transcription to open a Word doc

Status
Not open for further replies.

mThomas

Instructor
May 3, 2001
404
US
I have a project which is to create a hipaa compliant transcription process. One of the parts of the process is to upload a Word document. The Word document is then accessed by a transcriber. The transcriber edits the Word document and saves the document.

The Word document cannot be saved to the transcriber's computer.

There is an existing system called scribe.com which uses .net. I have taken a look at their system. I want to be able to emulate the way they handle the Word document.

I have been trying in PHP and vb.net. There are fantastic persons trying to help me figure it out in PHP. I am partial to PHP becuase there is a telcom part of the project using Asterisk AGI being written in PHP, but will use whatever I need to use.

I can, in vb.net, create a page with a button, and then clicking the button opens an existing word document. This only works within the IDE when I right click on the file name in solutions explorer and select view in broswer. If I publish the web site and try on the net, the page with the button opens but no Word document is opened when the button is clicked.

I can also do the same thing on the server as I can on my local computer. On the server, within the IDE Solutions Explorer, if I right click on the file name and view in browser, the word document is opend as a word document.

I understand the transcriber will have to set their file association to open Word in IE.

When I tried the scribe system, and clicked on the open document button, the document opened as a Word document and not within the browser. That is because i did not have the file types set to open Word in IE.

I cannot even get my version to open Word live on the net. The page I'm using does create the button and does seem to do something, there is a progess bar, but nothing is loaded or displayed to the screen.

The server I'm working with has trial version of Office Small Business.

I've been looking at PHP or .net, but neither seems to be working. At least in vb.net I can, locally, open a word document.

I have added a COM reference to Word within the project.

Here is the code I'm trying.

Code:
<%@ Page Language="VB" Debug="true" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<%@ import Namespace="System.Runtime.InteropServices" %>
<%@ import Namespace="Microsoft.Office.Interop" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.Windows.Forms" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]

<script runat="server">

   

    
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim oWord As Object

        oWord = CreateObject("Word.Application")
        oWord.Visible = True
        oWord.Documents.Open(Request.PhysicalApplicationPath & "admissions.doc")

    End Sub
    
    
</script>

<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:Button ID="Button1" runat="server" Text="Button" />
    </form>
</body>
</html>

Any help or suggestons?

tia...mike
 
you code is executing on the server, not the client. this works when you access the website from your development machine and the production server because the client and server are the same box. this will never work in a true client/server topology because the boxes are physically independent. if you want the file to open up on the client's machine. you need to load the word document into a byte[] or Stream and load this into the Response.Output.

off the top of my head it would look something like this
Code:
var fileName = GetFullPathToFileFromSomewhere();
Response.Output.WriteFile(fileName);
Response.ContentType = "appliation/ms word";

//add headers as necessary
Response.Headers.Add("key", "value");
using a generic handler (ashx) is the preferred approach to load non-html content to the client. Page (aspx) is specific to rendering html and a form. You don't need any of that in this scenario as you are loading a word document.

the most common example of this is loading an image from a database to display on screen. in your case you are loading a word document from file. but the mechanics of sending the document to the client are the same.

finally, because you are dealing with HIPPA. You will also want to understand how the file handled at the client. I think it must save the file to open it. where exactly I'm not sure. but I'm sure that it does. from the browser's view it's just a response and all responses go through the same processing. so you may need either:
1. a clean up process to ensure the files are deleted after viewing. (delete temp files from browser?)
2. add additional headers to the response that prohibit caching, etc.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top