Create a new form to enter Lab Tests

Tags: #<Tag:0x00007f0f1c712208> #<Tag:0x00007f0f1c7120f0> #<Tag:0x00007f0f1c712000>

i an using openMRS-standalone version 2.10

I need to make a form where one can enter Lab services or Lab test provided to patient. ( Only need to enter ICD codes of the tests )

i have gone through https://wiki.openmrs.org/display/docs/Concept+Dictionary+Basics . but i haven’t found anything much helpful.

Please tell me if there is any tutorial of how to create a new form and connect it to Database.

Also please tell me if any form to record lab test is available in openMRS, or someone who has made it before ,because it is such an essential part of Medical Record System.

If there is any tutorial or something which can help. please suggest.

@gcliff @reagan sir please guide

@meullah how about designing an html form to capture this data with the help of the htmlformentry module

1 Like

@gcliff Thanks, but how do i connect my form to database in backend

@meullah are you talking about an html form with a POST or GET method in a browser that you wan to connect to the database ?

1 Like

yes! i want to enter Lab services like we enter Diagnostics

@meullah Did you look at this?

1 Like

Oh realised @gcliff has already shared it…Your worry shouldn’t be how the form connects to the database because that is the work of the HTML Form Entry module…

1 Like

great! i will look at them

I have create a from, now i am unable locate it in GUI of openMRS?

Could you share the form… Because the metadata is very important

1 Like
<htmlform>
	
    <style type="text/css">
        #who-when-where {
            margin-bottom: 6px;
            border-bottom: 1px solid #ccc;
        }

        #who-when-where p {
            display: inline-block;
            padding-right: 20px;
        }

        #where > input[type=text] {
            display: inline-block;
        }

        .field-error {
            color: #ff6666;
            font-size: 1.1em;
            display: block;
        }

        <ifMode mode="VIEW" include="false">
            #data-collection {
                display: inline-block;
                width: 58%;
                vertical-align: top;
            }

            #encounter-diagnoses-target {
                display: inline-block;
                width: 40%;
                vertical-align: top;
            }

            #encounter-diagnoses-app {
                margin-bottom: 20px;
            }
        </ifMode>
    </style>

    <ifMode mode="VIEW" include="false">
        <h2>Lab Test</h2>

        <div id="who-when-where">
            <p id="who">
                <label><uimessage code="coreapps.patientDashBoard.provider"/></label>
                <span><encounterProvider default="currentUser" required="true"  /></span>
            </p>
            <p id="when">
                <label><uimessage code="coreapps.patientDashBoard.location"/></label>
                <span><encounterLocation default="SessionAttribute:emrContext.sessionLocationId"/></span>
            </p>
            <p id="where">
                <label><uimessage code="coreapps.patientDashBoard.date"/></label>
                <span><encounterDate id="encounterDate" default="now" /></span>
            </p>
        </div>
    </ifMode>

    <div id="data-collection">

        <encounterDiagnoses required="true" selectedDiagnosesTarget="#encounter-diagnoses-target"/>

        <p>
            <label><uimessage code="coreapps.consult.freeTextComments"/></label>
            <obs conceptId="CIEL:162169" style="textarea" rows="5"/>
        </p>

    </div>

    <div id="encounter-diagnoses-target">
    </div>

    <ifMode mode="VIEW" include="false">
        <div id="buttons">
            <submit submitClass="confirm right" submitCode="general.save"/>
            <button type="button" class="cancel"><uimessage code="general.cancel"/></button>
        </div>
    </ifMode>

</htmlform>

I have copied code for Diagnostics form and changed Form title

@reagan kindly review, form