introduction

2018年9月19日 星期三

Input method issue of Win 10 version 1803

Cpime appears to be the only available free Cantonese input method for Win 10. Yet it only supports desktop panel only. It needs to be added to the input method lists after installation before it can be used. However Windows 10's control panel no longer has input method edition section. Yet Windows' Setting only support metro panel language edition. I searched the web and at last found the solution:

關鍵在於「語言」的代號 {BF782CC9-5A52-4A17-806C-2A894FFEEAC5}
有兩種添加方法:
一、資料夾式
任意位置新增資料夾,輸入(任意名稱).{BF782CC9-5A52-4A17-806C-2A894FFEEAC5}
(包括小數點和大括號)
例如:lang.{BF782CC9-5A52-4A17-806C-2A894FFEEAC5}
便可直接進入語言設定

二、捷徑式
任意位置新增捷徑,輸入 explorer shell:::{BF782CC9-5A52-4A17-806C-2A894FFEEAC5}
自己指定名稱,也可更改圖示。如語言設定的預設圖示位於 %SystemRoot%\System32\UserLanguagesCpl.dll

現在便可進入以前控制台的語言設定頁面,並對僅限桌面版本的輸入法進行新增/移除了。

2018年5月23日 星期三

Issues after updating Win 10 to version 1803

My computers were automatically updated to version 1803 recently, of course without my prior approval. It was a terrible nightmare, thanks to M$. My system ran into chaos. The client computers' CMS failed to start because they could not connect to the server. In fact no computers appeared at the windows explorer page any more. That meant we could not find one another and share files or use others' sharing printers attached to print files. My clinic procedures almost came to a halt. Fortunately one of the client computer had been updated but not yet rebooted. It's still running the old version and thus our work could be carried on temporarily.

 More fortunately was that a friendly old client attended me at that damn right time. He is an IT professional and he helped me to solve this emergency.

First of all, after the update. the computers were no longer publicizing their presence in the network. To recover this, two services' startup type need to be set to: automatic (delayed start) for all computers:

  1.  Function Discovery Provider Host
  2.  Function Discovery Resource Publication

Open a CMD and type services.msc to get the list of services to edit and enable.

After that the network group was retrieved to a seemingly normal state but the client CMS still could not connect to the server. Eventually we found out that now the Win 10 had become so stupid that we could ping by IP but not by name. Since CMS connects to the server by its host name, it failure is certain. The solution we used was fixing the server name to its IP address.

Open a CMD at the server. Type ipconfig to check its IP. Open a CMD with administrative right at each client computer. change directory to

     C:\Windows\System32\drivers\etc, type notepad hosts, edit it by inserting a line:
     the host computer’s IP(eg 192.168.1.138) its name(eg master)
and save. Fix the IP address to static as such at the router's control panel. it worked. The system could be run again.





The same worked for network printer by fixing the host's name to its IP.



2014年4月16日 星期三

Microsoft security essentials for Win XP - No more free lunch!

If you are still using Windows XP with M$ security essentials installed, you will have noticed from time to time a pop-up message warning you the system is not supported. Dont ignore it. I urge you to uninstall the MSE immediately! The threat has arrived! Today two of my computers with this config failed to work. They freeezed at the login screen no matter how many time I rebooted. The murderer was the MSE! Here is how to solve it.

1. Boot Windows in safety mode (press and hold F8 on starting up the computer).
2. Login with Administrator account.
3. Click on Start, choose Run...
4. On the dialog box, type msconfig.
5. Select Services tab, search for Microsoft antimalware service and unmark the checkbox to disable this service.
6. Click OK. THIS WILL DISABLE MICROSOFT SECURITY ESSENTIALS,
7. Reboot the machine and let Windows XP start normally.
8. uninstall MICROSOFT SECURITY ESSENTIALS
9. run msconfig again and re-check the box to re-enable the service

Install another anti-virus instead.

2014年3月5日 星期三

Failure to back up the database

I was trying to backup one day. To my astonishment it returned an error box reporting dumping failure. I was shocked as backup was so important. I checked the Tomcat\logs\stdout_(that day). It revealed:

    "mysqldump: Error 1194: Table 'prescription_detail' is marked as crashed and should be repaired when dumping table `prescription_detail` at row: 175681"

I at once tried to find a solution from the web. Indeed there were. However I, being a novice,  could not understand even 1% of the complicated dot prompt commands they mentioned!
I was desperate. Hey wait, I almost forgot my dearest Heidi....Heidisql. I ran it, found the prescription_detail table, Rt click and choose mainenace and then repair. It was fixed! I could do back up smoothly again! Thanks to Heidi, I love you!

2013年3月7日 星期四

Unable to start CMS after updating Java runtime

If the Java runtime autoupdate is not turned off, it will urge you to update from time to time. If you allow it, you may not be able to connect to the server next time you start CMS3. I think it is due to either the downloaded Java software's error or the alternation of certain path.

First you may try to start the Java console at the control panel. If it fails, you need to reinstall the Java runtime by downloading directly from java.com, not by autoupdate again. Sometimes it works and you may restart Apache Tomcat by: Rt click my computer, select Manage, then Service of Services and Applications.

However, if you still fail to start Tomcat and get the message below, you can try this:

   

Start the CMS3 (service) and display below error


1. Edit a JAVA_HOME environment
Right Click the "My Computer" ---> Properties---> select Advanced ---> Environment Variables



2. You must need to enter the java_home in system variables
 New ---> Variable name: JAVA_HOME
                  Variable value : (Select your java path) such as: C:\Program Files\Java\jdk1.6.0_13
    ---> Ok ---> Ok ---> Ok
3  In the Command Prompt
     Resinstall the CMS3 tomcat
     i.  sc delete cms3
    ii.  service install cms3
   iii.  sc start cms3

4  Restart CMS3 Client



                                                   
This is adopted from Q1 of the "Report Problem" section of the FAQ online. What I want to tell you is that the sevice install is not a windows command. It originates from the Service.bat of Tomcat. So in the command prompt, you need to change the directory to C:\Program files\CMS3\Tomcat\Bin before you can execute it.

2012年6月12日 星期二

Faulty Java Update

After the automatic update of my Java RE to version 1.6.0_32, the CMS client can no longer connect to the local server. Even the Apache Tomcat cannot be started, only showing an error code 1067 on starting. No solution could be found on the net. Eventually I discovered the Java console panel cannot be opened as well. So there must be a problem of the java installation. I downloaded a standalone same version  (7 now, no more 6 on development) Java from Sun (now Oracle) and reinstall, the Java console worked again and the CMS3 can be opened again after restarting the computer. But if it still not open, I am sure reinstalling the CMS3 (un-ticking MySQL and Java) should work.

2012年5月15日 星期二

Setup Tips 3: Wise use of Alias

The field "Alias" is not only for recording the alternate name of an object, but also rendering you more convenient to search it. The best example  is drug inventory. If you just search by a drug's alphabetical name, it will return together with a long series of unrelated drugs. But if you add a prefix such as "0" or "*" to create an alias, e.g. 0paracetamol, you will get it in no time. Also some clients' English name are spelled extraordinarily, e.g. Lin instead of Lam, giving an alias "Lam" is very useful for searching.

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.