18
Mediware Information Systems, Inc. Mediware.com | 1.888.Mediware ©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary. -AlphaFlex Document XML Coding Documentation AlphaFlex Document XML Coding Documentation Mediware has developed a XML-based standard for automatically Populating Microsoft Word 2007 documents (DOCX) from user input, and from specific data that exists within AlphaFlex. In order for a user to be able to use this new functionality, the form that the provider uses must be “Templated”. This Guide will walk you through the steps to “template” out a form that the provider has supplied us with. Before we begin, here are some key terms that will be used through this documentation: Template(or “Document Template”) - A word document that is essentially an empty form. This document is serves as the master template for each form, and is stored in our system under the “Document Templates” tab on the client homepage. (more on this later). Content Controls -Content controls are word-based controls that can be populated within a template. We will discuss these in greater detail later. Schema - We will refer to schema as the “XML Schema” that is attached to the content controls in the document. Toolkit - The Word 2007 Content Control Toolkit is a helper application that we can use to modify the content controls (discussed later) within a document. We will refer to it as “the Toolkit” Justification The types of Forms Providers use vary from agency to agency. Often times, the provider requests that the information in these forms not only be stored within AlphaFlex, but also be able to be reported on within the system. Rather than build new modules to store the information contained within the forms, AlphaFlex has built a single module that is capable of reading a “Templated” form, identifying the editable fields, and then presenting the user with a screen where they can enter the relevant info, for the fields contained within the template. Once the fields have been filled out, the user has the option of generating a document, where the fields are taken from the screen, populated to the document and rendered to the user. OR, they can save these fields directly to the system, where they can view the completed document at any point in the future.

Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Embed Size (px)

Citation preview

Page 1: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

AlphaFlex Document XML Coding Documentation

Mediware has developed a XML-based standard for automatically Populating Microsoft Word 2007 documents (DOCX) from user input, and from specific data that exists within AlphaFlex. In order for a user to be able to use this new functionality, the form that the provider uses must be “Templated”. This Guide will walk you through the steps to “template” out a form that the provider has supplied us with.

Before we begin, here are some key terms that will be used through this documentation:

Template(or “Document Template”) - A word document that is essentially an empty form. This document is serves as the master template for each form, and is stored in our system under the “Document Templates” tab on the client homepage. (more on this later).

Content Controls -Content controls are word-based controls that can be populated within a template. We will discuss these in greater detail later.

Schema - We will refer to schema as the “XML Schema” that is attached to the content controls in the document.

Toolkit - The Word 2007 Content Control Toolkit is a helper application that we can use to modify the content controls (discussed later) within a document. We will refer to it as “the Toolkit”

JustificationThe types of Forms Providers use vary from agency to agency. Often times, the provider requests that the information in these forms not only be stored within AlphaFlex, but also be able to be reported on within the system. Rather than build new modules to store the information contained within the forms, AlphaFlex has built a single module that is capable of reading a “Templated” form, identifying the editable fields, and then presenting the user with a screen where they can enter the relevant info, for the fields contained within the template. Once the fields have been filled out, the user has the option of generating a document, where the fields are taken from the screen, populated to the document and rendered to the user. OR, they can save these fields directly to the system, where they can view the completed document at any point in the future.

Page 2: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

Example:

Below is a list of forms that have been structured into a “template”. Each choice in the dropdown represents an “empty” form, or “template” that is stored in the database as a byteArray field.

Once a template is selected, the system will retrieve the document stored, determine the editable fields in the document, and display them in a popup template, where information can be inserted, by the user.

Notice that some fields are already populated (highlighted in red), and are just labels (not editable). These are fields that come from the database, and can be changed elsewhere in the application.

Page 3: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

For Billing Documentation templates, the end of the document (or last tab of the document) will be appear as below:

After the user has filled out all relevant fields, the user can generate the document by clicking the Preview button. The document will open the default “word processing” program and show details that have been inputted by the user (highlighted with red arrows and boxes below).

Page 4: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

Content ControlsThe editable fields contained within the document above are content controls, a Word-based control that can be editable without actually opening the document. AlphaFlex can populate a variety of content control types, but the majority of controls used will be of type “Textbox”. For signatures, the “picture content control” is used.

The first step in formatting a form into a template is to open the word document form and locate all the areas where information will be typed in by the user. A content control should be placed in each of these areas. To do this, follow the steps below:

First, click on the “Developer” Tab at the top, then click Design Mode.

Once in Design Mode, click on the area that you wish to enter a content control and then click on the “Textbox” content control type button under the “Controls” panel up top. Once clicked, you will see the content control being entered in the area of the document where your cursor was. See Below:

Page 5: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

After the content control has been entered in the document, you need to give it a descriptive name. To do this, right-click on the content control and click on “properties”. In the tag and title textboxes, enter a name for the content control. Make sure to be descriptive, as you will have to recognize this control by the name, later on.

For all areas in the document that should contain some sort of free text (names, dates, and free text that can contain paragraphs of information), use the Textbox Content Control. For areas that should contain a “Signature”, use the “Picture Content Control”. Make sure to format the size of the picture content control to be the correct size.

Checkbox Controls

Unfortunately, for checkboxes, Word does not provide a “Checkbox Content Control” in Word 2007. However, this functionality is available in Word 2010. To accommodate Word 2007 users, we use a Textbox Content Control, and then place an open bracket ( [ ) on the left of the control, and a closing bracket ( ] ) on the right of the control Rectangle behind the content control. If the field is checked on the Template screen, the Content control will render as [X]. See the sample template provided in the developer’s packet for an example.

TIP: It may be helpful when naming checkbox controls, to give them a prefix that indicates they are indeed, a checkbox. For instance, for a checkbox that indicates if someone is handicapped, we could

name it “chk_handicapped”.

Page 6: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

XML Schema Once the Content controls have all been placed on the document, we need to map these controls to a “Schema”, which is essentially an XML document containing tags of each content control field. This schema is used to store the information entered in the content controls, and is attached to the Word document behind the scenes. We will go into more detail on how to access this XML document later, but first, let’s look at what the XML document contains. Below is a sample schema for the PCP Document in AlphaFlex:

<?xmlversion="1.0"encoding="utf-8"?><DataTemplate><DOBType="LABEL"Description="Date of Birth"Required="true"DataField="ClientData"DataFieldName="dob"></DOB><ClientNameType="LABEL"Description="Client Name"Required="true"DataField="ClientData"DataFieldName="clnt_fullname"></ClientName><MedicaidIdType="LABEL"Description="Medicaid ID"Required="false"DataField="ClientData"DataFieldName="medicaid_num"></MedicaidId><RecordNumberType="LABEL"Description="Record (MRN) Number"DataField="ClientData"DataFieldName="mrn"></RecordNumber><LegallyResponsiblePrintNameType="TEXTBOX"Description="Legally Responsible Person"></LegallyResponsiblePrintName><StrategiesType="MULTILINE"Description="Stategies"></Strategies><TargetStatusDropdownType="DROPDOWN"Description="Target Status"ReferenceData=”TargetStatus”></TargetStatusDropdown><TeamMemberType="SIGNATURE"Description="Other Team Member Name"SignDate="" /><DataType="Data"><TargetStatusDataType="ReferenceData"><Values><OngoingDescription="Ongoing">O</Ongoing><RevisedDescription="Revised">R</Revised><DiscontinuedDescription="Discontinued">D</Discontinued><RevisedDescription="Achieved">A</Revised></Values></TargetStatus><ClientDataDataType="DataField"SQLProcedure="csp_get_clin_doc_client_info"><SqlParameters><clnt_id></clnt_id></SqlParameters></ClientData><PCPData><SqlParameters><pcp_idPromptUser =”true”></pcp_id></SqlParameters></PCPData></Data></DataTemplate>

Page 7: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

The Schema serves a few purposes:

- The first purpose of the schema is to provide metadata to the “Popup Template”. The Popup Template is simply reading the schema that is attached to the document. Below, you can see the popup template that is rendered based on the example schema provided on the previous page. Notice that the fields in the popup exactly match the XML tags in the schema shown above.

(Note: The author, effective date, end date, and submit checkbox fields at the bottom are not generated by the XML schema, and are there for all document templates.)

If you take another look at the XML schema, each tag can contain several attributes. These attributes give the popup template the information it needs to determine “how” to render each field. For example, the attribute Type="TEXTBOX" tells the Popup Template to render this field as a textbox control. If the Type attribute is set to Type="LABEL", then the field is displayed as such, and is read-only. There are several different attributes that will be displayed later.

- The Second Purpose of the schema is to store the information typed into the popup template. Once the information is typed into the popup Template, and the user clicks the information will be stored in the actual inner Text of the XML schema, and then the schema itself is saved to the database so it can be rendered to the user in the Popup Template AND/OR in the document itself upon Preview.

Page 8: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

Schema AttributesAs previously discussed, there are many attributes that a tag can have. Each attribute affects how the input field will be displayed on the Popup Template:

Attribute Name Used on Tags of TYPE: Description Possible Values TYPE n/a Used to specify what control type

the field should be rendered as, in the popup Template.

Here are a few examples of how DataTags are used:

- A Dropdown tag might reference a DataTag to get its possible values.

- A tag of type LABEL might reference a DataTag to pull its value that exists in the database.

Here are the possible values for the Type attribute:

TEXTBOX - 1 line text inputMULTILINE - multiple line text inputDROPDOWN – Dropdown list of valuesLABEL – This type is read-only and cannot be edited. This type of tag is mainly used when the value comes from the database, or rarely, when header text is needed on the popup template.DATE - This type is used to enter DateTime values.SIGNATURE – canvas used for signing documentsLEGACYCHECKBOX - Used for checkboxes in word 2007. Will display a checkbox on the popup template, and will display an X on the document itself, however a rectangle needs to be drawn in the document so that when the X appears, it will be displayed as x

CHECKBOXLIST – this type is a listing of checkboxes. When you use the CHECKBOXLIST tag, all checkbox tags within it will display within one specific line. This tag is used when a checkbox list can have one or more selections. Currently, all child tags within this must be of type “LEGACYCHECKBOX”.Here is an example of a checkbox list:<SampleCheckBoxList Type="CHECKBOXLIST" Description="Checkbox List"><Check1 Type="LEGACYCHECKBOX" Description="sampleCheck1"></Check1><Check2 Type="LEGACYCHECKBOX" Description="SampleCheck2"></Check2><Check3 Type="LEGACYCHECKBOX" Description="SampleCheck3"></Check3></SampleCheckBoxList>

DATA- This type indicates that the tag is NOT an input field, but actually a tag that contains “Data”. We refer to these tags as “DataTags”. DataTags acts as agents of data that is either stored in child tags within themselves, or for data that is contained within a database. Other Input controls can reference the DataTag by using the DataField attribute (explained later). FIELDHEADER – This type is used to enclose other fields in a “sub-section” with a header at the top. For instance, if you have several fields that fit under a specific category, you can encapsulate the fields in a tax of type “FIELDHEADER”, and when the popup

Page 9: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

template is displayed, the fields will show as one “subsection”. Here is an example of a Field Header:<HeaderField1 Type="FIELDHEADER" Description="This is the header"><ClientName Type="LABEL" Description="Client Name" Required="true" DataField="ClientData" DataFieldName="clnt_fullname"></ClientName><MedicaidId Type="LABEL" Description="Medicaid ID" Required="false" DataField="ClientData" DataFieldName="medicaid_num"></MedicaidId><RecordNumber Type="LABEL" Description="Record (MRN) Number" DataField="ClientData" DataFieldName="mrn"></RecordNumber><PCPCompleteDate Type="LABEL" Description="PCP Complete Date" Required="false" DataField="ClientData" DataFieldName="PCP_complete_date"></PCPCompleteDate></HeaderField1>

-

DESCRIPTION TEXTBOXMULTILINEDROPDOWNSIGNATURELEGACYCHECKBOX

This will be the description of the field on the popup template.

Any Value

REQUIRED TEXTBOXMULTILINEDROPDOWNSIGNATURELEGACYCHECKBOX

Tells the popup template that the field is required and must be entered before the document can be “submitted”. A red asterisk will appear to the left of the field if this is set to TRUE.

- TRUE- FALSE

LINK LABEL This is used to give the user a link to where they view some external information. This could be another website, or a link within the application.

Link to another page in the application or another website.

CHANGELINK LABEL This particular link is used to give a "changelink" within the application. When provided, it will open a modal on top of the application and the information can be changed. Only links provided by a developer will work. Only use links that have been approved, and that are shown in this documentation.

Links to a Modal where the information can be changed. The following links have been approved and can be used. DEVELOPERS - ADD TO THIS LIST AS WE GO

Diagnosis Change link - /ClientAccount/ViewClientDiagsVitals Link - /ClientAccount/ViewVitals

DATATYPE DATA (Used on its child elements)

This attribute is used on Tags that are contained within a DataTag. The DataType attribute specifies whether the Data is either reference data (where the values are hardcoded within the tag), or data that comes from the database in a datafield

- ReferenceData- DataField

DATAFIELD LABEL This attribute is used mainly on tags that are of type LABEL when the value comes from the database and NOT user input. The value of the field specifies the tag name of the corresponding DataTag child element. The Related XML Tag contains information on how to pull the data. (See “DataType” attribute for more info.)

Value should contain the Tag name of another Tag that is of datatype “DATAFIELD” (DataType="DataField")

DATAFIELDNAME LABEL This attribute is used mainly on tags that are of type LABEL when the

The value specified here is the column that will be used to populate the Label tags value. You must use

Page 10: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

value comes from the database and NOT user input. The value is used to specify a specific column me to look for from the procedure (specified in the DATAFIELD attribute).

For example: in a label tag, you specify that DataField Name= ”clnt_name”. When the Popup Template was rendered, it would execute the csp_get_client_clin_doc_info procedure, and the look for a column called clnt_name. The first value returned in that column would be label value.

the DataField attribute as well, so that the tag will know where to find the data.

REFERENCEDATA DROPDOWN This attribute is used mainly on tags that are of type DROPDOWN. The value specified is the DataTag Child element of the dropdowns values.

Value should contain the Tag name of another Tag that is of datatype “REFERENCEDATA” (DataType="ReferenceData">)

SQLPROCEDURE DATA (used on its child elements)

Child elements of a DataTag can possess an attribute called “SQLPROCEDURE” this tag indicates that the data that is represented by the tag is returned by the procedure specified.

The procedure name in the database that returns the specified data.

Page 11: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

DATA TAG SCHEMA Pay close attention to the formatting of the DataTag. Below is a DataTag that contains two types of Child Elements: ReferenceData and DataFields.

<DataType="Data"><TargetStatusDataType="ReferenceData"><Values><OngoingDescription="Ongoing">O</Ongoing><RevisedDescription="Revised">R</Revised><DiscontinuedDescription="Discontinued">D</Discontinued><RevisedDescription="Achieved">A</Revised></Values></TargetStatus><ClientDataDataType="DataField"SQLProcedure="csp_get_clin_doc_client_info"><SqlParameters><clnt_id></clnt_id></SqlParameters></ClientData><PCPData><SqlParameters><pcp_idPromptUser =”true”></pcp_id></SqlParameters></PCPData></Data>

Notice the TargetStatus child tag is of type ReferenceData. All tags of type ReferenceData have data specified directly in the child elements. As you can see, there are 4 values for TargetStatus. These are typically used for Dropdown Fields. When referenced by a dropdown, the Description element will be used as the value displayed in the dropdown. The InnerText of each tag (O, R, D, and A) will be the “SelectedValue” of the dropdown value, and will be the value that is stored when the user selects a from the dropdown list.

When the TargetStatus is of type DataField, the tag functions as an “agent” for the data, and by using the SQLProcedure attribute, and the <SqlParameters> child tags, will retrieve the data from the database when it is referenced. DataField types are typically referenced by “read-only” Tag types like the LABEL type.

In the case when the sql Parameters need to come from the “user”, you can specify the <PromptUser =”true”>

attribute. When this is set, the modal popup will automatically prompt the user for the value. Once the user enters the value, it will execute the SQL code and Present the Modal Popup. This is shown in the example <pcp_idPromptUser =”true”></pcp_id>.

SQL PROCEDURE TO PULL BASIC CLIENT INFORMATIONOften times, only basic information about the client need to be pulled, like date-of-birth, SSN, Medicaid policy number, etc. Most of these fields are returned in the csp_get_clin_doc_client_info procedure. This stored procedure, used in conjunction with a Child DataTag of type DataField, can pull almost any information stored in the system about a client. Most all document templates will utilize this procedure through a datatag. It returns over 100 different columns, and typically, if you are attempting to populate a content control that contains client information, then this procedure will return it.

Page 12: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

Below is a list of fields that are returned by this procedure. When assigning the “DataFieldName” attribute to a tag, be sure to name it exactly as spelled below.

- Demographic fields. clnt_fullname clnt_id current_dt mrn fname lname dob SSN medicaid_numaddr1 addr2 city state zip phone clnt_work_phone meds_yes_no clin_nameclin_phone crisis_plan_id symptoms prevention strategies recommendationsafter_crisis living_will want_living_will active create_dt update_dt mname

maiden_name ethnicity

- Crisis Plan Info hc_power_attorney want_hc_power_attorney advanced_instruction want_advanced_instruction living_will_cb want_living_will_cb hc_power_attorney_cb want_hc_power_attorney_cb advanced_instruction_cb want_advanced_instruction_cb emergency_cont emergency_addr emergency_add2 emergency_city emergency_state emergency_zip emergency_citystatezip emergency_phone emergency_work emergency_relation emergency_relation_desc

- Insurance Info priority1_ins_name priority1_policynum priority2_ins_name priority2_policynum priority3_ins_name priority3_policynum

- Medication Info med1_freq med1_desc med1_dosage med1_pescrib_dt med2_freq med2_desc med2_dosage med2_pescrib_dt med3_freq med3_des med3_dosage med3_pescrib_dt med4_freq med4_desc med4_dosage med4_pescrib_dt

- Substance abuse info sa_yes_no sa1_drug sa1_length sa1_freq sa1_amount sa1_last_use_dt sa2_drug sa2_length sa2_freq sa2_amount sa2_last_use_dt sa3_drug sa3_length sa3_freq sa3_amount sa3_last_use_dt sa4_drug sa4_length sa4_freq sa4_amount sa4_last_use_dt

- Allergy Info allergy1 allergy2 allergy3 allergy4

- Diagnosis Info axis1_diag_code axis1_diag_desc axis1_diag_date axis2_diag_code axis2_diag_descaxis2_diag_date axis3_diag_code axis3_diag_desc axis3_diag_date axis4_diag_codeaxis4_diag_desc axis4_diag_date axis5_diag_code axis5_diag_desc axis5_diag_dateaxis1_primary_diag_code axis1_primary_diag_desc axis1_primary_diag_dateaxis1_principle_diag_code axis1_principle_diag_desc axis1_principle_diag_dateaxis1_additional_diag_code axis1_additional_diag_desc axis1_additional_diag_date

Page 13: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

axis1_gaf_diag_code axis1_gaf_diag_desc axis1_gaf_diag_date axis2_primary_diag_codeaxis2_primary_diag_desc axis2_primary_diag_date axis2_principle_diag_codeaxis2_principle_diag_desc axis2_principle_diag_date axis2_additional_diag_codeaxis2_additional_diag_desc axis2_additional_diag_date axis2_gaf_diag_codeaxis2_gaf_diag_desc axis2_gaf_diag_date axis3_primary_diag_code axis3_primary_diag_descaxis3_primary_diag_date axis3_principle_diag_code axis3_principle_diag_descaxis3_principle_diag_date axis3_additional_diag_code axis3_additional_diag_descaxis3_additional_diag_date axis3_gaf_diag_code axis3_gaf_diag_desc axis3_gaf_diag_dateaxis4_primary_diag_code axis4_primary_diag_desc axis4_primary_diag_dateaxis4_principle_diag_code axis4_principle_diag_desc axis4_principle_diag_dateaxis4_additional_diag_code axis4_additional_diag_desc axis4_additional_diag_dateaxis4_gaf_diag_code axis4_gaf_diag_desc axis4_gaf_diag_date axis5_primary_diag_codeaxis5_primary_diag_desc axis5_primary_diag_date axis5_principle_diag_codeaxis5_principle_diag_desc axis5_principle_diag_date axis5_additional_diag_codeaxis5_additional_diag_desc axis5_additional_diag_date axis5_gaf_diag_codeaxis5_gaf_diag_desc axis5_gaf_diag_date clnt_ethnicity clnt_race clnt_genderclnt_primary_diagnosis1_code clnt_primary_diagnosis1_descclnt_primary_diagnosis2_code clnt_primary_diagnosis2_descclnt_primary_diagnosis3_code clnt_primary_diagnosis3_descclnt_primary_diagnosis4_code clnt_primary_diagnosis4_desc

- Other Info clnt_marital clnt_employment clnt_education clnt_primary_language clnt_episode_admin_dtclnt_episode_dis_dt clnt_asam_score1 clnt_asam_score2 clnt_asam_score3clnt_asam_score4 generic_consent first_responder_name first_responder_contactfirst_responder_consent legally_responsible_name legally_responsible_contactlegally_responsible_consent community_support1_name community_support1_contactcommunity_support1_consent community_support2_name community_support2_contactcommunity_support2_consent professional_support1_name professional_support1_contactprofessional_support1_consent professional_support2_name professional_support2_contactprofessional_support2_consent physician_support_name physician_support_contactphysician_support_consent respite_provider_name respite_provider_contactrespite_provider_consent

Page 14: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

CREATING AN XML SCHEMA DOCUMENT After you have followed the steps to add content controls to the Document Template explained in previous pages, then the next step is to create an XML schema and attach it to the Document template. This can be done using the Word 2007 Content Control Toolkit (this software will need to be obtained by the user independently and installed on the user’s machine). AlphaFlex Support does not provide assistance for troubleshooting this software.

Once you have the tool installed, Run the Toolkit and then open your Document Template that contains your newly created content controls. Once open, you will see the below screen. Note the content controls on the left. These are the content controls that you created within the document. They need to be mapped to a XML schema on the right, but as you can see, we need to create one first. To do this, click on the Create a new Custom XML Part link.

Page 15: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

Once clicked, the right side of the screen will open up for editing and you will see a root tag. Here is where you place your formatted XML Schema document.

NOTE: For the majority of Document Templates formatted, the fields that need to be there will be surprisingly similar, Name, DOB, SSN, Medications, Insurance Info, etc. Since that is the case, it’s usually easiest to start with a one of the already prepared sample schemas. You may have to add more XML fields to it, depending on what the requirements of the document are.

In the example below, a sample XML schema is copied to the right side of the screen.

Page 16: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

Once you’ve copied over your XML schema, click on the “Bind View” tab. If there are errors with the schema format, you will get an error. From here the data needs to be “Bound” to each content control. By binding the XML schema tag to a Content Control on the left, any information typed into the documents content control, will be stored into the InnerText of the XML schema tag. Conversely, when the XML schema inner text is changed, the change will be reflected in the documents content control when it is opened.

To Bind an XML tag to a content control, click on a tagname in “BindView” and drag it to the content control. You will see the “X-path” column be populated on the content control.

Once you have mapped all XML tags to the appropriate content control, be sure to save the document and close it.

Page 17: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

TESTING YOUR FORMATTED TEMPLATEIn order to test your newly formatted template, you will have to create a new Document Type in Administrative> System Data Maintenance, Document Types Tab and then upload the template.

After logging into AlphaFlex, navigate to the screen shown below.

Click Add New Record and the document details will appear on the right side of the screen.

Fill out the necessary fields (marked with a red asterisk). Be sure to name it appropriately and click SAVE.

To test, after uploading the document, open a client’s homepage. Navigate to the Document Tab on the Client Homepage. You should see your new document type listed in the CREATE dropdown. To View the Template, click on the document to open it in AlphaFlex.

Page 18: Document XML... · Web view... Mediware.com | 1.888 ... Populating Microsoft Word 2007 documents (DOCX) ... a form into a template is to open the word document form and locate

Mediware Information Systems, Inc.Mediware.com | 1.888.Mediware©2018 Mediware Information Systems, Inc. All Rights Reserved. Confidential and Proprietary.

-AlphaFlex Document XML Coding Documentation

RESOURCE LINKShttp://seroter.wordpress.com/2009/12/23/populating-word-2007-templates-through-open-xml/

http://msdn.microsoft.com/en-us/library/bb157891.aspx

http://blogs.msdn.com/b/ericwhite/archive/2008/10/19/creating-data-bound-content-controls-using-the-open-xml-sdk-and-linq-to-xml.aspx