introduction

2011年6月28日 星期二

Setup Tips 2: Firewall exceptions

Windows firewall prevents foreign intrusions. However, if you want your client computers be able to connect and access the server, you need to add exceptions to the firewall of the server. Open Control panel and then Windows firewall, click "Exception" tab. Click "add new program" and set the path to ....\CMS3\bin\tomcat6. Also click "add new port" and fill in any name such as CMS3, port number 443, and select TCP. Click ok.

Setup Tips 1: Faster running

To run HKMA CMS 3.0 smoothly, you need a robust computer. Mine is Sandy bridge quadcore i5 2500, 4 GB ram (only 3.2 GB usable under 32 bit Win XP). I suppose it would be better if you use 64 bit Win 7 along with 64 bit version of CMS 3x so that you can add physical memory more than 4 GB. In addition, the IT professionals know how to reconfigure the program to assign more memory for its usage (editing the startup.bat and service.bit in the bin  folder). Also it would be wise to disable any energy saving program installed with the computer. Lastly you need a large screen monitor, at least 22 in, in order to take full advantage of the program.

2011年6月22日 星期三

Separation line disappears

On designing the drug label, I drew a line separating the header and the content. However when the labels were printed in sequence, the line was printed in dotted line on one label alternating with not printed on another. The solution is to make the line bolder. Open with notepad the file Content.css in the following path:

C:\Program Files\CMS3\Tomcat\webapps\CMS3\js\ext-2.2\tiny_mce\themes\advanced\skins\default\content.css

Add the following lines between the @@@s, excluding the @@@s, and then restart the service:

table.requestItem th {
    cursor:text;
    font-size:0.75em;
    background-color:#cccccc;
    border-bottom: 1px solid #000000;
}

@@@
hr{
    background-color: #000;
    color: #000;
    border-top: 2px #000 solid;
    border-bottom: 0px;
    border-left: 0px;
    border-right: 0px;
    height: 0;
}
@@@

/*
@media screen{
    html {
        background-color:#ecf5f7;
    }

2011年6月21日 星期二

Free office suite

Talking about free office suite, as an alternative to the costly M$ Office, many people think of Open Office. But it is quite slow to start up. Another very good free MS Office compatible office suite worth mentioning is the Softmaker Office 2008. It is fast, stable and compatible with Chinese input (it even comes with a Simplified Chinese interface). It can be downloaded from www.softmakeroffice.com. Registration is needed. I recommend installing English instead of Simplified Chinese interface to avoid strange characters in the tool-bars, and also not to install the smash quick launch utility.

Free MySQL editor

Sometimes you may need to edit the databases. A graphical editor would help. Navicat  is the most famous but it is expensive. I found a very good alternative in the internet, the HeidiSQL. It can be downloaded free from www.heidisql.com. It even has a portable version. Open it, give a name such as Cms3 to the profile, fill in the password, most likely....you know, and you can now view and edit the databases, such as emptying the Print Log.

Failure to rebuild search index

Rebuilding Search Index not only occurs when you restore the databases or manually perform it, but in fact also takes place every time you start the program. So any mishap hindering this process may lead to slowing down of the start up or even errors on searching the databases. For example, you cannot locate a client in the pool. One of the causes I encountered was that one of the databases was too big. That database was the Print Log (>100 MB after 1 year of usage). The solution is of course truncating the Print Log. The easiest way should have been "Export and delete log files" under Admin tab. But wait, export is ok but no single data is deleted, i.e. Bug! You then have to do this at the command prompt if you know how to input those DOS like commands. But if you are like me, a computer beginner, a GUI MySQL editor is mandatory. See next blog. Hence I strongly recommend you regularly back up and empty the log databases. You may ask the Patient database and the Consultation database will become really big one day, what will happen then? The answer I don't know. How about the vast amount of attachments uploaded? I was told the attachments are not involved in the rebuilding Search Index process and should not be worried.

2011年6月19日 星期日

Failure to restore databases

I found some error in the databases one day and I tried to fix it by restoring to the previous day's backup. "Failure to restore the databases and files" was the result. The CMS3\Tomcat\Log\stdout_(date) log file revealed database copied but rebuilding search index failed. You might try to rebuild search index manually, but success is not guaranteed because you haven't touch the underlying cause

2011年6月17日 星期五

Failure to update clients' profile due to locked indexing

One morning, I tried to edit a client but the system failed to save the changes, namely "submission failed". So were all other edits. The stdout_(date) log file (path: CMS3\Tomcat\Log\) revealed:

errors.GrailsExceptionResolver org.compass.core.engine.SearchEngineException: Failed to delete alias [Patient] and ids [[stored/uncompressed,indexed<pid:15958>]]; nested exception is org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock@C:\.grails\projects\CMS3\searchable-index\production\index\patient\write.lock

In short, the searchable-index folder was locked. I was told that the lock up might have resulted from the conflict between the system's indexing function with that of Windows. The solution is disabling the latter's application on the searchable index: Right click C:\.grails\projects\CMS3\searchable-index, select properties, click "advanced" and un-check "indexing". Restart the server afterward. Problem solved. This modification is recommended at the beginning.